Class SoundBank
Represents a collection of Cues.
public class SoundBank : IDisposable
- Inheritance
-
SoundBank
- Implements
- Inherited Members
Constructors
SoundBank(AudioEngine, string)
public SoundBank(AudioEngine audioEngine, string fileName)
Parameters
audioEngineAudioEngineAudioEngine that will be associated with this sound bank.
fileNamestringPath to a .xsb SoundBank file.
Properties
IsDisposed
Is true if the SoundBank has been disposed.
public bool IsDisposed { get; }
Property Value
IsInUse
Is true if the SoundBank has any live Cues in use.
public bool IsInUse { get; }
Property Value
Methods
Dispose()
Disposes the SoundBank.
public void Dispose()
~SoundBank()
protected ~SoundBank()
GetCue(string)
Returns a pooled Cue object.
public Cue GetCue(string name)
Parameters
namestringFriendly name of the cue to get.
Returns
- Cue
a unique Cue object from a pool.
Remarks
Cue instances are unique, even when sharing the same name. This allows multiple instances to simultaneously play.
PlayCue(string)
Plays a cue.
public void PlayCue(string name)
Parameters
namestringName of the cue to play.
PlayCue(string, AudioListener, AudioEmitter)
Plays a cue with static 3D positional information.
public void PlayCue(string name, AudioListener listener, AudioEmitter emitter)
Parameters
namestringThe name of the cue to play.
listenerAudioListenerThe listener state.
emitterAudioEmitterThe cue emitter state.
Remarks
Commonly used for short lived effects. To dynamically change the 3D positional information on a cue over time use GetCue(string) and Apply3D(AudioListener, AudioEmitter).
Events
Disposing
This event is triggered when the SoundBank is disposed.
public event EventHandler<EventArgs> Disposing