Saturday, January 23, 2016

Cocos2d-x C++ Setup Audio

In gaming industry, audio is a must component for making game more interesting. This tutorial show how to implement audio system in your game.

Aside playBackgroundMusic(), there are more function that you can apply,
  • stopBackgroundMusic(bool releaseData=false)
  • pauseBackgroundMusic ()
  • resumeBackgroundMusic ()
  • rewindBackgroundMusic ()
  • willPlayBackgroundMusic ()
  • isBackgroundMusicPlaying ()
  • setBackgroundMusicVolume (float volume)
  • playEffect (const char *filePath, bool loop=false, float pitch=1.0f, float pan=0.0f, float gain=1.0f)
  • pauseAllEffects ()
  • resumeAllEffects ()
  • stopAllEffects ()

0 comments:

Post a Comment