Recently I have encountered a problem: the sound effect will be delayed after 0.5 is played on the Android phone. It seems to be very common, but I have not found an effective solution. What does it seem to have to do with OpenAL? I don’t know much about this. Is there any general solution available? Thank you!
In my apk package, I did not find the openal.so file.
I found that lime updated MojoAL, will it help this, and look forward to the release of 7.0.0.
Can you tell if the delay is decoding the audio file, or is it playback? Is there a delay every time the sound is played, or only the first?
Every time this will happen, I am currently testing 3 Android devices, this problem will occur. I also tried to use Demo to get the same result.
Forgot to explain, my music resources are cached locally.
If there is a delay only the first time, then it might be decoding the sound file into memory, but if you have already loaded the sound, and pause, play the same sound, then the delay would be caused by the audio library (like ALsoft) rather than the decoding.
I think this is probably the problem. Is there any good way to solve this? This sound sounds uncomfortable on Android.
I now have a temporary solution, using Android’s native SoundPool API, I rewrote two classes: Sound&SoundChannel to bind this SoundPool API, which does not prevent me from generating HTML5 or C++ other platforms. This makes my delayed sound disappear.