-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Mastering Cocos2d Cross-Platform Game Development
By :
If you've ever wanted an easy way to play sound files, OALSimpleAudio is the thing you need. It can very easily load a large variety of sound files, play effects, loop background music, and a lot more. Its existence and integration with Cocos2d makes it much easier to bring your game to life with the immersive capabilities of sound and music.
If you've programmed in Cocos2d before and are wondering where SimpleAudioEngine is, starting in Cocos2d v3.0, OALSimpleAudio is the new way to play sound effects. It's basically everything that SimpleAudioEngine was.
If you try to play an effect using OALSimpleAudio, there will be a slight freeze, or delay, as the device tries to quickly load the effect into the memory and then play it right away. Luckily, there's a way to load the sound effects and music such that it doesn't freeze in front of your users when you try to play an effect.
OALSimpleAudio allows preloading of effects...
Change the font size
Change margin width
Change background colour