Audio latency on Android

Audio latency on Android seems to be a well known issue (see: Need a fix for Audio Lag (Android) , Need a fix for Audio Lag (Android) , Unity3D Audio Latency in Android - Stack Overflow, etc.)

I am seeing ~300ms of delay on an S21 Ultra. No changes to any of the audio or asset settings make any difference at all. Rewriting the audio system to use native audio (via Android Native Audio | Audio | Unity Asset Store) resolves the problem and exhibits completely reasonable audio latency.

It seems fair to say that 300ms of audio latency cannot be considered usable for most real-time applications. Is there any intention to fix this within Unity? Is there any explanation as to why the built in audio system is so bad compared to native plugins? Are there any work arounds in 2023 which don’t require writing two separate audio systems for a multiplatform game?

Please submit a bug report with repro project attached, I don’t think there are known bugs to issue you’re describing above.

I have submitted a bug report and created a repro project: https://unity3d.atlassian.net/servicedesk/customer/portal/2/IN-48324

Attached is a video of the issue. The four buttons in the app do the following:

  1. Static - uses a static Audio Source component with a static clip and calls .Play() when clicked.
  2. One Shot - uses .PlayOneShot() and specifies the same clip as above.
  3. Dynamic - spawns a new Audio Source and plays it when clicked, cleaning up sounds when they finish playing in Update()
  4. Native - uses the AndroidNativeAudio plugin to play sound.

It’s pretty clear in the video how much latency there is with the first three buttons.

9156431–1273445–Screen_Recording_20230719_092647_AndroidAudioLatency.zip (580 KB)

@Tomas1856 Just to update the thread in case people end up here from a search engine, there was already an issue tracking this:

I gave it an upvote, for what it’s worth.

Hi @Tomas1856 , sorry to bump an old thread but I was just wondering if you might have any insight into the status of this? From the issue in the tracker I linked above, this seems to impact iOS and Android. For most real-time scenarios I imagine 500ms audio lag is basically a show stopping issue. Is this something which is just accepted in 2023 while it’s in beta and I can be confident it’ll be resolved before LTS, or is there some way of working around this that I’m missing? Many thanks!

BUMP BUMP BUMP!
Meta Quest development is imposible on 2023 because of this issue.

BUMP for me too!

Unity 2021 LTS has a frustrating framepacing issue with URP which I’ve discovered is fixed in 2023… But the audio latency is awful! This desperately needs fixing - there seems to be no reliable version of Unity that is currently good for Quest 2 development…!

Poked Audio team internally.

BIG BUMP!

Recently started testing on newer Android devices and I’m experiencing upward of 400ms latency. I cannot publish on Android devices until this issue is resolved or I implement a solution myself. This has seriously stagnated my progress.

This latency issue is with our fairly new Android AAudio driver, which first appeared in Unity 2023.x, so it shouldn’t affect earlier versions of Unity. We do have a fix internally that we’re just now starting to test.

Thanks for reporting this! Unfortunately, I don’t have any good immediate work-arounds for this other than just using an earlier release of Unity or waiting for the fix to be released. Sorry for the inconvenience.

Appreciate the update, thank you. Happy to know a fix is in the pipeline. Do you have any idea what the timeline might look like for this fix arriving in 2023.2?

For anyone else having this dilemma - try moving to 2022.3.9f1 for now - both the audio issue and performance issues seem to be absent from this version at least.

Unity 2021 and 2022 both have native lib errors for specific android devices on android 13, Unity 2023 fixes these issues, but now has this audio latency issue. I am stuck.

I have tried the latest alpha version of 2023 and audio is still broken, any chance a fix will be pushed anytime soon?

I’m using Unity 2019 and the latency is here and very noticeable.
Is it better on newer versions?

BUMP! :slight_smile:
Currently our app will not be released on android because of this issue. Any news from the audio team?

Same issue here ! I had to update Unity to version 2023.1.18f1 to fix a bug but now I have huge sound latency on android phones … :frowning:
Is there anything we can do but wait for a fix ?
Can you tell us when a fix will be released ?

I mean this latency is the result of them trying to fix the audio latency Unity has had since 2014, so the lessons here are: a. don’t hold your breath, b. lower your expectations about what a fix will do for you.

It looks like a fix for the issue is in the pipeline for 2023.3, so hopefully that will be in one of the next alpha releases.

When will this get fixed?

Bump here, every audio in my app has a latency of ~500ms. I had no issues in 2022.3.6f1 and just moved to 2023.2.4f1. Reverting to 2022 with no other things done instantly fixed the issue. Won’t be upgrading for now!