SimpleAudioEngine failing to loop effects

SimpleAudioEngine failing to loop effects
0.0 0


Hi all,

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.

Thanks in advance.


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…


+1 to this. Our game has the same problem.
After a level or two of play, the background loop just stops.

We looked everywhere for leaks, bad logic, etc. I don’t feel that it is our coding issue.


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;

So far no problems.


I had the same problem and it seems that changing sourceGroups[i].nonInterruptible = false; tosourceGroups[i].nonInterruptible = true; also works for me. Thanks.


I have the same problem on android too, but I can’t find a quick fix. Any ideas?

PS: Why isn’t this looped sounds bug already fixed in the official release(s)?