Audio Playback
Sound Effects
You will need to declare a SoundEffect:
SoundEffect effect;
In LoadContent you can then load in your sound effect:
effect = Content.Load<SoundEffect>("MySoundEffect");
You can then use the play method to play it when you want:
effect.Play();
Or you can set these and then play the sound effect:
float volume = 1.0f; float pitch = 0.0f; float pan = 0.0f; effect.Play(volume, pitch, pan);