Playing a Sound
This topic demonstrates how to play a simple sound by using SoundEffect. To play a sound using wave banks and sound banks from a Microsoft Cross-Platform Audio Creation Tool (XACT) project, see Playing Sounds from an XACT Project.
The code in this topic shows you the technique for playing sound. You can download a complete code sample for this topic, including full source code and any additional supporting files required by the sample.
To add a sound file to your project
Load your XNA Game Studio game in Visual Studio.
In Solution Explorer, right-click the solution's Content project.
Click Add, and then click Existing Item.
Navigate to the .wav file you want to add, and then select it.
The selected .wav file is inserted into your project. By default, it is processed by the Content Pipeline, and built wave files are accessed automatically when the game is built.