Cue Class
Defines methods for managing the playback of sounds.
Namespace: Microsoft.Xna.Framework.Audio
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public sealed class Cue : IDisposable
Remarks
Cues are what programmers use to play sounds. Cues are typically played when certain game events occur, such as footsteps or gunshots. A cue is composed of one or more sounds, so when the cue is triggered, the set of associated sounds is heard.
A sound specifies how one or more waves should be played. A sound also has specific properties such as volume and pitch. The sound designer can adjust these properties.
The advantage to using the Audio API to reference cues rather than specific sounds is that an audio designer can reassign sounds to a cue in the sound bank without programmer intervention. For example, a sound designer can try various gunshot waves associated with a particular game event without requiring the programmer to change code or rename sounds.
Cues and sounds are referenced through SoundBank objects. The waves that compose a sound are referenced through WaveBank objects.
See Also
Tasks
How to: Play a Sound
How to: Stop or Pause a Sound
Concepts
Reference
Cue Members
Microsoft.Xna.Framework.Audio Namespace
Platforms
Xbox 360, Windows XP SP2, Windows Vista