Hello,
When I realized there were a few issues with SoundPool (crashes are reported with the Samsung Galaxy S2 for example), I tried to find an alternative. There are two: OpenSL and OpenAL, but only OpenSL is interesting because it is already delivered with your OS since Gingerbread and it is hardware-accelerated. Unfortunately OpenSL ES is not a Java library and there's nothing in the API to call its methods. So I had to write the .so libraries in C, then the wrapper in Java.
The big advantage over SoundPool (except it doesn't crash on some devices) is that you're not limited by the sound duration or the file size. You can use it to play music if you wish. The big drawback is that you cannot play any sound format. Only PCM 16 bits, 44.1 khz. I don't have enough time to write a decoder for the MP3 and OGG formats.
Another advantage is that you can extend the possibilities (recording, 3D audio effects...) by calling other methods (if you add their declaration in the C code).
The library is provided as-is, with all the source code (C & Java). The C code is a modified version of the following project:
https://code.google.com/p/opensl-soundpool/
and needs the NDK to be compiled.
Since I don't want to maintain this project, I won't answer to questions and won't update the library.
When I realized there were a few issues with SoundPool (crashes are reported with the Samsung Galaxy S2 for example), I tried to find an alternative. There are two: OpenSL and OpenAL, but only OpenSL is interesting because it is already delivered with your OS since Gingerbread and it is hardware-accelerated. Unfortunately OpenSL ES is not a Java library and there's nothing in the API to call its methods. So I had to write the .so libraries in C, then the wrapper in Java.
The big advantage over SoundPool (except it doesn't crash on some devices) is that you're not limited by the sound duration or the file size. You can use it to play music if you wish. The big drawback is that you cannot play any sound format. Only PCM 16 bits, 44.1 khz. I don't have enough time to write a decoder for the MP3 and OGG formats.
Another advantage is that you can extend the possibilities (recording, 3D audio effects...) by calling other methods (if you add their declaration in the C code).
The library is provided as-is, with all the source code (C & Java). The C code is a modified version of the following project:
https://code.google.com/p/opensl-soundpool/
and needs the NDK to be compiled.
Since I don't want to maintain this project, I won't answer to questions and won't update the library.