Playing sounds and music
Most games use a variety of sound effects and at most a few different background music tracks. CocosDenshion is the audio library built into Cocos2d. It provides a number of features including the SimpleAudioEngine API.
In this recipe, we will use this API to play sounds and music.