SoundPool works properly on Android 1.6 but when I run on 2.1 in the Emulator I am getting a "sample 2 not READY" error message everytime I try to play a sound.
How do I fix this?
SoundPool works properly on Android 1.6 but when I run on 2.1 in the Emulator I am getting a "sample 2 not READY" error message everytime I try to play a sound.
How do I fix this?
SoundPool on Android 2.0 and higher works only with OGG Vorbis files. If you're using MP3 or the like, they won't decode.
On my device just wait a few seconds for the audio stream to be ready.
Or use this, OnLoadCompleteListener http://developer.android.com/reference/android/media/SoundPool.OnLoadCompleteListener.html
I can play ogg/wav/mp3...
SoundPool can create different decoder/player for each media type.