I’m creating an app where I need to load OGG audio files into a SoundPool, but it must be compatible with Android 2.1 (which does NOT support onLoadingCompleteSetListener). Because of this, there’s no way to tell if the sound file is loaded before playing it.
To bypass this, I put a Thread.sleep(1000); right after loading the audio file to give it some time to load. But now without the onLoadingCompleteSetListener method, my audio files are extremely static-y and unclear. It sounds horrible. But I’m not getting the “sample # not ready!” warning in LogCat so I think the Thread.sleep(1000); is doing its job.
But does Thread.sleep(1000); also stop the loading process? So actually I’m not giving it time to load and that’s why it’s static-y? I can’t figure this out, I just need my audio to be clearer. Any suggestions could help.
Thanks!
Solved myself, used Audacity to normalize and compress the audio files after learning about it from the answer in another one of my questions: Audio Sound Too Low in Android App
Fixed all the static