Sound effects in XNA are handled a little differently than other assets, such as images. This is done using Microsoft Cross-Platform Audio Creation Tool (XAct), a separate program that comes with XNA. This is separate program, as it allows sound artist to add lots of effects to the sound effects, separating this part of the game development from the coding team.
To open XAct, open up your Start menu, and choose Programs -> Microsoft XNA Game Studio 3.1 -> Tools -> Microsoft Cross-Platform Audio Creation Tool (XAct). After XAct has launched, start a new project by opening the File menu and choosing New Project. Browse to the Content folder of your XNA project, call your project xactProject and hit the Save button.
3 important things in XAct :
- When you import a sound file into XAct, this is called a Wave.
- From each Wave, you can create multiple Sounds. You can add special effects to Sounds.
- You can create playlists from Sounds, which are called Cues. Cues are what we will actually start from within our XNA code
XAct main window
- To create new Wave Bank simply left click “Wave Banks” and choose “New Wave Bank”
- To create new Sound Bank simply left click “Sound Banks” and choose “New Sound Bank”
- To Create new Category, simply lect click “Categories” and choose “New Category”
Adding wave file to Wave Bank
- In Wave Bank window left click and choose “Insert Wave File(s)”
- Drag wave file to Cue section in Sound Bank Window
At last, don’t forget to build and save your project :D
Next !!! Implementing our XAct project in our code