SoundBank

class SoundBank : System.Object, System.IDisposable

Represents a collection of Cues.

readonly bool IsInUse

Is true if the SoundBank has any live Cues in use.

readonly bool IsDisposed

Is true if the SoundBank has been disposed.

SoundEffectInstance GetSoundEffectInstance(int waveBankIndex, int trackIndex, ref bool streaming)
Parameters:
  • waveBankIndex (int) –
  • trackIndex (int) –
  • (ref) streaming (bool) –
public Cue GetCue(string name)

Returns a pooled Cue object.

Parameters:
  • name (string) – Friendly name of the cue to get.
Returns:

a unique Cue object from a pool.

public void PlayCue(string name)

Plays a cue.

Parameters:
  • name (string) – Name of the cue to play.
public void PlayCue(string name, AudioListener listener, AudioEmitter emitter)

Plays a cue with static 3D positional information.

Parameters:
  • name (string) – The name of the cue to play.
  • listener (Microsoft.Xna.Framework.Audio.AudioListener) – The listener state.
  • emitter (Microsoft.Xna.Framework.Audio.AudioEmitter) – The cue emitter state.
public void add_Disposing(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void remove_Disposing(System.EventHandler<EventArgs> value)
Parameters:
  • value (System.EventHandler<EventArgs>) –
public void Dispose()

Disposes the SoundBank.