Music

GDD Link

The Audio class is availible to the engine as a static global variable and houses the XNA sound engine.  The Update method must be called in the main game loop so the XNA's sound engine update can be called.


Background music

Background music is initialized using the PlayLevelSong and PlayTitleSong methods. The title song function contains the name of the track used in the MenuSystem and is played throughout the load sequence. All Level background tracks are passed in from XML. These can be changed by editing the level's xml file and modifying the “music->background” property. Background sound can be turned on and off in game by entering the Pause Screen and selecting the appropriate option.



Sound effects

Sound effects access the Sound Class directly using it's static global handle. Since they are non-looping events, the use of a cue is not needed. Thus Sound Effects calls are scattered through out the program code.

All of the effect methods are simply wrappers that call the PlayCue method. This is useful since developers are not required to know the name of the effect in order to call it's play event. Also, since all the effect calls are consolidated to one location, the audio file that is called can be changed in a single place instead of tracking down each reference throughout the code.

System is configured with:

Sound effect sounds can be turned on and off in game by entering the Pause Screen and selecting the appropriate option.



Home