Reputation: 5546
CocosDension's SimpleAudioEngine offers way to loop background music. But only one music file can be played at a time. I need to loop multiple sound files. Is there an easy way to achieve this using CocosDension of Cocos 2d?
Upvotes: 1
Views: 671
Reputation: 1027
You can also use the
SimpleAudioEngine::playEffect(soundfile, true)
This will play the effect in a loop
Upvotes: 0
Reputation: 1408
If you use the CDSoundSource you can set if you want to loop or not the sound. Yes define a CDSoundSource for each sound and play independently.
Check the samples in the CocosDenshion folder, specifically FadeToGrey/TheAudioCode class.
Upvotes: 1