tags:

views:

509

answers:

2

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?

+2  A: 

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.

Brian
WOW - thanks for the information.
jax
Hope that works for you. Took me a while to figure out.
Brian
A: 

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.

Gung Shi Jie