I’m trying to loop 2 sound effects along with other effects that i am playing occasionally. There are about six effects running randomly say in 2 to 3 sec interval.
The problem i am facing is, the effects that i am trying to loop as mentioned before are stopping after 2-3 loops. But the other effects that are running randomly are playing without any problem.
If i play only the 2 looping effects (without random effect) it plays fine.
I have also tried with the background music, but this also failed.
I’m using cocos2d-x 2.0 and I have tried on both simulator and device (iPad 1)
Is there any limit on the effects in sound engine to play.
Please help me out.
I have the same problem too. Looped sounds gets stopped after some random time. It seems that a source in the pool gets reused which stops the looped sound.
I haven’t figured out a solution for this problem…
I’ve hacked the CocosDenshion.m file, and now looped sounds are not interrupted. It’s not an elegant solution, but I needed a quick fix.
In - _setUpSourceGroups: definitions total: total I’ve changed this line _sourceGroups[i].nonInterruptible = false; to _sourceGroups[i].nonInterruptible = true;
I had the same problem and it seems that changing sourceGroups[i].nonInterruptible = false; tosourceGroups[i].nonInterruptible = true; also works for me. Thanks.