To reduce Android audio latency, set Edit > Project Settings > Audio > DSP Buffer Size to Best latency. Switch to Good latency if you hear crackling. How much delay remains depends on the device and its Android version: on Android 8.1 and later, Unity 2023.1 and later uses Android's low-latency AAudio API; older devices or Unity versions use OpenSL ES or AudioTrack, which this setting cannot change.
To reduce the delay between triggering an AudioClip and hearing it on Android, open Edit > Project Settings > Audio and set DSP Buffer Size to Best latency. This setting controls the output latency of the game. How much delay remains after that depends on the device and its Android version.
How do I reduce audio latency on Android?
- In the Unity Editor, select Edit > Project Settings.
- Select Audio.
- Set DSP Buffer Size to Best latency.
- Build to a device and test. If you hear crackling or dropouts, change the setting to Good latency instead.
The DSP Buffer Size options are:
- Default — uses the audio system's default buffer size for the platform.
- Best latency — audio responds faster but uses more system resources.
- Good latency — a balance between latency and performance.
- Best performance — audio has a slight delay but the system runs more efficiently.
The operating system can override the size you request. If it does, the Audio settings page shows the message "The requested buffer size (…) has been overridden to … by the operating system", and AudioSettings.GetDSPBufferSize() returns the size actually in use at runtime.
Every option on this page is described in the Audio project settings reference in the Unity Manual.
Why is audio delayed on Android in the first place?
Unlike iOS, Android does not guarantee a low-latency audio path on every device. On Android 8.1 and later, Unity 2023.1 and later uses Android's low-latency audio API, AAudio (see the Unity 2023.1 release notes); on older devices or older Unity versions, Unity uses OpenSL ES or AudioTrack instead, the delay on those paths depends heavily on the device, and the DSP Buffer Size setting cannot change which path is used.
This article is about the delay when playing sounds. If your delay is in microphone recording, see How do I play back microphone input in real time?
Are there other options?
Third-party audio plugins on the Unity Asset Store may help if the built-in settings are not enough for your project.