![]() |
Paradox Game Engine
v1.0.0 beta06
|
This class provides a sound resource which is playable but not localizable. More...
Static Public Member Functions | |
static SoundMusic | Load (AudioEngine engine, Stream stream) |
Create and Load a sound music from an input file. More... | |
Additional Inherited Members | |
![]() | |
virtual void | Play () |
Start or resume playing the sound. More... | |
virtual void | Pause () |
Pause the sounds. More... | |
virtual void | Stop () |
Stop playing the sound immediately and reset the sound to the beginning of the track. More... | |
virtual void | ExitLoop () |
Stop looping. That is, do not start over at the end of the current loop, continue to play until the end of the buffer data and then stop. More... | |
![]() | |
void | Dispose () |
override string | ToString () |
![]() | |
PropertyContainer | Tags |
Gets the attached properties to this component. More... | |
![]() | |
override void | Destroy () |
Disposes of object resources. More... | |
void | PlayExtended (bool stopSiblingInstances) |
Play or resume the current sound instance with extended parameters. More... | |
virtual void | StopConcurrentInstances () |
Stops the sound instances in competition with this sound instance. More... | |
![]() | |
ComponentBase () | |
Initializes a new instance of the ComponentBase class. More... | |
ComponentBase (string name) | |
Initializes a new instance of the ComponentBase class. More... | |
virtual void | OnNameChanged () |
Called when Name property was changed. More... | |
![]() | |
virtual float | Volume [get, set] |
virtual bool | IsLooped [get, set] |
virtual SoundPlayState | PlayState [get, set] |
![]() | |
long | Id [get, set] |
string | Name [get, set] |
Gets or sets the name of this component. More... | |
bool | IsDisposed [get, set] |
Has the component been disposed or not yet. More... | |
![]() | |
long | Id [get] |
Gets the id of this component. More... | |
string | Name [get] |
Gets the name of this component. More... | |
![]() | |
int | ReferenceCount [get] |
Gets the reference count of this instance. More... | |
![]() | |
ObjectCollector | Collector [get] |
Gets the collector. More... | |
![]() | |
SoundPlayState | PlayState [get] |
The current state of the sound. More... | |
bool | IsLooped [get, set] |
Does the sound is automatically looping from beginning when it reaches the end. More... | |
float | Volume [get, set] |
The global volume at which the sound is played. More... | |
This class provides a sound resource which is playable but not localizable.
SoundMusics are usually "long" sounds that need neither to be localized nor to be played with low latency. Classical examples are background music or explanations. SoundMusics are progressively streamed to minimize memory usage. The user can also reduce the assets global size using the MP3 file format to encode SoundMusic. If low latency or sound localization is required take a look at the SoundEffect or DynamicSoundEffectInstance classes.
Only one instance of SoundMusic can be played at a time. Thus, playing a new SoundMusic stops the previous instance.
You can create a SoundMusics by calling the static Load load function. Currently only mono and stereo wav and mp3 files are supported for SoundMusics.
Definition at line 29 of file SoundMusic.cs.
|
static |
Create and Load a sound music from an input file.
engine | The audio engine in which to load the soundMusic |
stream | The stream. |
System.ArgumentNullException | engine or filename |
System.ObjectDisposedException | The AudioEngine in which to create the voice is disposed. |
System.ArgumentException | engine or stream |
ObjectDisposedException | The AudioEngine in which to create the voice is disposed. |
ArgumentNullException | File ' + filename + ' does not exist. |
On all platform the wav format is supported. For compressed formats, it is the task of the build engine to automatically adapt the original files to the best hardware specific format.
Definition at line 54 of file SoundMusic.cs.
References SiliconStudio.Core.ComponentBase.IsDisposed.