Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
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 sound engine, which is an easy-to-use wrapper for both frameworks. CocosDenshion was created by Steve Oldmeadow and has been included with Cocos2D since the early days. Recently CocosDenshion has incorporated a new, simpler API called SimpleAudioEngine, which you use in this chapter. CocosDenshion leverages the power of AVAudioPlayer and OpenAL for you, so you don’t have to dive down into the lower-level sound APIs unless you want to.