SimpleAudioEngine Problem. Too many sound effects android

Hello,

I’ve just put my game on Android phone. My game has a lot of sound effects that can play at same time. This is not a problem on all apple devices I’ve tested on e.g.
iPhone 4, iPhone 6 plus, iPhone 5 and iPad 2. On my galaxy s3 and s5 however, i get a problem where some sounds aren’t getting played and some are getting cut short and it sounds awful.

Now i understand there is only a limited number of audio channels at my disposal and that if they are all being used cocos2dx will stop one channel to play another effect if asked to. Is this correct? If so, is there a way I can stop the audio engine from overwriting channels if all of them are being used? Also, why is this happening on android but not apple devices? Is it a case of less channels available on the galaxy phones? Any help for this would be greatly appreciated.

Matt

You may want to manage the audio sources by yourself. I believe you can play a sound on a given channel. You could decidea 0-1 = music (crossfade), 2 = dialog, 3-6 = main sfx, 7+ = superfluous sfx. This presumes 8+ channels, however, and I’m not sure what the minimum is on all devices.

Maybe:

AudioEngineWrapper::getInstance()->playSound ( normal play2d parameters, SFX_CHANNEL_DIALOG)

Regardless cocos2d-x should handle this for you by stopping the oldest sound and playing the new one on the same channel. Maybe it already does this, but then this error would be weird.

???