728x90 AdSpace

Latest Article

How to play .wav .mp3 file Sound in Coco2d-x

How to play .wav .mp3 file  Sound in Coco2d-x ?

Solution :


You can't play long clips with playEffect. You have to use playBackgroundMusic for those effects. You also need to preload the effects or tracks if you want the playback to be instantaneous or quick. The file formats also need to be acceptable by CocosDenshion. Look at the header file to understand what formats are accepted and what aren't. Lastly look at the CocosDenshionTest.cpp file if you want to see usage patterns / sample code (how to give the location of a resource file, set the volume etc)
no image
  • Title : How to play .wav .mp3 file Sound in Coco2d-x
  • Posted by :
  • Date : 11:11
  • Labels :

  • Blogger Comments
  • Facebook Comments


Post a Comment