Class AudioEngine
Class used to create and manipulate code audio objects.
public class AudioEngine : IDisposable
- Inheritance
-
AudioEngine
- Implements
- Inherited Members
Constructors
AudioEngine(string)
Initializes a new instance of the AudioEngine class by reading out the specified XACT settingsFile
public AudioEngine(string settingsFile)
Parameters
settingsFile
stringPath to a XACT settings file.
Exceptions
- ArgumentException
Invoked if
settingsFile
is IsNullOrEmpty(string)
AudioEngine(string, TimeSpan, string)
Initializes a new instance of the AudioEngine class by reading out the specified XACT settingsFile
[Obsolete("Use AudioEngine(string settingsFile) instead. The lookAheadTime and rendererId parameters are not used.")]
public AudioEngine(string settingsFile, TimeSpan lookAheadTime, string rendererId)
Parameters
settingsFile
stringPath to a XACT settings file.
lookAheadTime
TimeSpanNot in use:
use the AudioEngine(string) constructor instead!rendererId
stringNot in use:
use the AudioEngine(string) constructor instead!
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