I’ve been developing an android game with SDL2, and after adding all the sfx I noticed that there is a noticeable delay between the sound’s “deployment” and when the sound is actually played.
Now, I know android is bad with audio latency in general, but I’m experiencing a delay of at least 100+ms, and many other games on android don’t have this problem at all(I personally can’t hear latencies in most of the games I play).
I believe it’s fair to mention that I’m developing in python, but as far as I’m aware SDL is simply compiled with the android NDK and hooked by pysdl, so I don’t really think it matters.
I tried every possible combination of chunk size/frequency available for
Mix_OpenAudio. I believe I got small improvements, but the latency is still pretty sensible.
More information about my code:
I load the chunks using
Mix_LoadWAV (they’re ogg vorbis, but the decoding should be done a load time, right?)
The chunks are played with
Mix_PlayChannel(-1, chunk, 0).
What do you think about it?
Thank you in advance.