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 had to play around 10 Sounds in parallel for a Drumkit-Simulation. Therefore, I put every sound in an own soundpool and used StreamIds to identify and stop any equal sound, in case it was already playing.
int newStreamID = soundPool.play(soundIDs.get(0), volume, volume, 1, 0, randomFloatRate);
if (StreamID != null) {
soundPool.stop(StreamID);
}
StreamID = newStreamID;
As far as I know Soundpool decompresses the audiofiles, so you can save CPU-Usage by using the .wav format.
For changing Audio formats I use FormatFactory