Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 8. Pump Up the Volume! > Introducing CocosDenshion

Introducing CocosDenshion

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.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial