In the last chapter you learned how to create menus and link scenes together in your games. Now it is time to head back into the gameplay and add music and sound effects to Space Viking. In this chapter you will learn how to use the audio engine included with Cocos2D and how you can add audio to your own games. Read on to hear what Ole the Viking sounds like, and find out what sounds break the silence of the alien planet.
Apple provides two great frameworks to play audio on iOS devices,
AVAudioPlayer and OpenAL.
AVAudioPlayer is a quick and simple way to play audio but gives you only limited control, while OpenAL is a lower-level API with more features.
Cocos2D comes bundled with the CocosDenshion ...