SoundPool limit of 256 calls to load?

SoundPool limit of 256 calls to load?
0.0 0


I’m working on an app where upon initializing a new scene, I preload the sound effects I need. On exiting the scene, I unload these same sound effects to help conserve memory. I never have more than 24 sound effects loaded in memory at one time, but I’ve found when I preload the 256th sound effect (by entering and exiting a scene a bunch of times), SoundPool stops being able to play any newly preloaded effects. I get the following warning in the LogCat:

sample XXX not READY

where XXX can be replaced by any number larger than or equal to 256.

I’ve also been able to reproduce this issue with the following simple loop:

for (int i=0; i<300; i++)


I put some debug statements in and found that createSoundIDFromAsset is returning valid soundIDs, but doPlayEffect returns 0 for the streamID after I reach this limit.

Any thoughts as to how to get around this 256 limit?