I am having a problem With SoundPool as it refuses to work with my .ogg files. I am getting this error:
AudioFlinger could not create track, status: -12
Erro
I was facing this error too recently. Mine was a collision actually taking place multiple times in a loop so it would actually stack the sounds until they dropped out, this causing the error, yet it would keep playing. I fixed this by registering a bounce as 1 when it occurs.
// bouncecount=
// 0=no bounce
// 1=set when bounce occurs and plays the sound
// 21=reset
Since the game runs at roughly 60fps, this only allows one instance of the sound 3 times a second and could be adjusted easily by changing the 20. Not only did this reduce jitter in the game, it isn't the least bit noticeable.
if(bouncecount==1){
sounds.play(sbump,1,1, 0, 0, 1);bouncecount++;}
else{if(bouncecount<20&&bouncecount!=0){bouncecount++;}
else{bouncecount=0;}}
Hope this helps someone.