Class AudioEngine
Class used to create and manipulate code audio objects.
public class AudioEngine : IDisposable
- Inheritance
-
AudioEngine
- Implements
- Inherited Members
Constructors
AudioEngine(string)
public AudioEngine(string settingsFile)
Parameters
settingsFile
stringPath to a XACT settings file.
AudioEngine(string, TimeSpan, string)
public AudioEngine(string settingsFile, TimeSpan lookAheadTime, string rendererId)
Parameters
settingsFile
stringPath to a XACT settings file.
lookAheadTime
TimeSpanDetermines how many milliseconds the engine will look ahead when determing when to transition to another sound.
rendererId
stringA string that specifies the audio renderer to use.
Remarks
For the best results, use a lookAheadTime of 250 milliseconds or greater.
Fields
ContentVersion
The current content version.
public const int ContentVersion = 39
Field Value
Properties
IsDisposed
Is true if the AudioEngine has been disposed.
public bool IsDisposed { get; }
Property Value
Methods
Dispose()
Disposes the AudioEngine.
public void Dispose()
~AudioEngine()
protected ~AudioEngine()
GetCategory(string)
Returns an audio category by name.
public AudioCategory GetCategory(string name)
Parameters
name
stringFriendly name of the category to get.
Returns
- AudioCategory
The AudioCategory with a matching name. Throws an exception if not found.
GetGlobalVariable(string)
Gets the value of a global variable.
public float GetGlobalVariable(string name)
Parameters
name
stringFriendly name of the variable.
Returns
- float
float value of the queried variable.
Remarks
A global variable has global scope. It can be accessed by all code within a project.
SetGlobalVariable(string, float)
Sets the value of a global variable.
public void SetGlobalVariable(string name, float value)
Parameters
Update()
Performs periodic work required by the audio engine.
public void Update()
Remarks
Must be called at least once per frame.
Events
Disposing
This event is triggered when the AudioEngine is disposed.
public event EventHandler<EventArgs> Disposing