Audio playback on android is delayed

Hi all,

I don’t know if i’m the only one with this problem or not. I’ve been trying to find information and other ppl with the same issue, but have found none so far. So i’ll just make a new post for it.
My audio playback on android is delayed a little. Enough to make it annoying for sure. I play footsteps on collision with the ground for example, and it feels very strange when the sound comes a while after the foot has been put down.
I have tried the normal audio.Play() and also audio.PlayOneShot but they behave the same. When using the same code on iPhone devices it works great.
Any ideas on this would be very much appreciated.

Are you suffering pre Gingerbread crappy audio latency as described here http://code.google.com/p/android/issues/detail?id=3434 ?

Ah, i probably am. Finally some light on the issue. Thank you very much.
So that means that we will have to wait until unity implements the gingerbread api for low-latency audio?

I am having this exact issue, but I am testing on a 2.3.4 device at the moment. So should I still be having that issue?

Edit: after reading a bit more, I am starting to get the impression that it’s an API that Unity would have to incorporate AND the hardware has to support. Surprised how far behind Google is on this. If anyone understands this issue a bit better and how long we have until its fully supported in Unity, please pipe in. Thanks!

To update my own post with notes for others…

  1. Change Audio Manager settings DSPBuffer Size to “Best Latency”. This helps quite a bit, but still not nearly as good as iOS.
  2. I am told that Unity 3.5 should have OpenSL support for gingerbread+ devices to finally achieve decent latency.

Does unity really uses OpenSL as audio driver on andoid?? if that’s true why the audio latency hasn’t been fixed yet :frowning: its terrifying …