![]() |
Paradox Game Engine
v1.0.0 beta06
|
Represents the audio engine. In current version, the audio engine necessarily creates its context on the default audio hardware of the device. The audio engine is required when creating or loading sounds. More...
Public Member Functions | |
AudioEngine (uint sampleRate=0) | |
Create an Audio Engine on the default audio device More... | |
void | Update () |
Method that updates all the sounds play status. More... | |
void | PauseAudio () |
Pause the audio engine. That is, pause all the currently playing SoundInstanceBase, and block any future play until ResumeAudio is called. More... | |
void | ResumeAudio () |
Resume all audio engine. That is, resume the sounds paused by PauseAudio, and re-authorize future calls to play. More... | |
SoundEffect | GetLeastSignificativeSoundEffect () |
Return the SoundEffect evaluated as having least impact onto the final audio output among all the non stopped SoundEffect. More... | |
![]() | |
void | Dispose () |
override string | ToString () |
Static Public Attributes | |
static readonly Logger | Logger = GlobalLogger.GetLogger("AudioEngine") |
The logger of the audio engine. More... | |
Protected Member Functions | |
override void | Destroy () |
Disposes of object resources. 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... | |
Properties | |
AudioEngineState | State [get, set] |
The current state of the AudioEngine. More... | |
![]() | |
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... | |
Additional Inherited Members | |
![]() | |
PropertyContainer | Tags |
Gets the attached properties to this component. More... | |
Represents the audio engine. In current version, the audio engine necessarily creates its context on the default audio hardware of the device. The audio engine is required when creating or loading sounds.
The AudioEngine is Disposable. Call the ComponentBase.Dispose function when you do not need to play sounds anymore to free memory allocated to the audio system. A call to Dispose automatically stops and disposes all the SoundEffect, SoundEffectInstance and DynamicSoundEffectInstance sounds created by this AudioEngine
Definition at line 80 of file AudioEngine.cs.
SiliconStudio.Paradox.Audio.AudioEngine.AudioEngine | ( | uint | sampleRate = 0 | ) |
Create an Audio Engine on the default audio device
sampleRate | The desired sample rate of the audio graph. 0 let the engine choose the best value depending on the hardware. |
AudioInitializationException | Initialization of the audio engine failed. May be due to memory problems or missing audio hardware. |
Definition at line 92 of file AudioEngine.cs.
|
protectedvirtual |
Disposes of object resources.
Reimplemented from SiliconStudio.Core.ComponentBase.
Definition at line 285 of file AudioEngine.cs.
SoundEffect SiliconStudio.Paradox.Audio.AudioEngine.GetLeastSignificativeSoundEffect | ( | ) |
Return the SoundEffect evaluated as having least impact onto the final audio output among all the non stopped SoundEffect.
Definition at line 214 of file AudioEngine.cs.
void SiliconStudio.Paradox.Audio.AudioEngine.PauseAudio | ( | ) |
Pause the audio engine. That is, pause all the currently playing SoundInstanceBase, and block any future play until ResumeAudio is called.
Definition at line 158 of file AudioEngine.cs.
void SiliconStudio.Paradox.Audio.AudioEngine.ResumeAudio | ( | ) |
Resume all audio engine. That is, resume the sounds paused by PauseAudio, and re-authorize future calls to play.
Definition at line 194 of file AudioEngine.cs.
void SiliconStudio.Paradox.Audio.AudioEngine.Update | ( | ) |
Method that updates all the sounds play status.
Should be called in same thread as user main thread.
InvalidOperationException | One or several of the sounds asked for play had invalid data (corrupted or unsupported formats). |
Definition at line 145 of file AudioEngine.cs.
|
static |
The logger of the audio engine.
Definition at line 85 of file AudioEngine.cs.
|
getset |
The current state of the AudioEngine.
Definition at line 153 of file AudioEngine.cs.
Referenced by SiliconStudio.Paradox.Audio.SoundInstanceBase.PlayExtended().