Book Image

Learning Cocos2d-x Game Development

By : Siddharth Shekar
Book Image

Learning Cocos2d-x Game Development

By: Siddharth Shekar

Overview of this book

Table of Contents (19 chapters)
Learning Cocos2d-x Game Development
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Audio in Cocos2d-x


As Cocos2d-x supports various platforms, it needs to support the audio formats in each of the platforms as well. It is recommended that you use platform-specific format for your game to avoid any issues that might arise due to incompatibility. You can visit the Cocos2d-x wiki to know more about the different formats: http://www.cocos2d-x.org/wiki/Audio_formats_supported_by_CocosDenshion_on_different_platforms. I will just highlight formats for some of the popular platforms and operating systems.

Cocos2d-x also supports different formats for background music and sound effects for the same platforms, but it is highly recommended that you use the same format for both the background music and sound effects just to avoid confusion. The following table shows the preferred format for the different platforms:

Platform/OS

Format

Windows Phone 8, Windows Desktop, and Windows App

.mid and .wav

iOS and Mac

.mp3 and .caf

Ubuntu, Android, Blackberry, and Tizen

.ogg

Now that...