An update on Android’s audio latency

Copy paste programmers

Posted by Don Turner – Android Developer Relations Engineer

This article takes a look at what’s changed in the Android ecosystem for audio developers recently, the audio latency of popular Android devices, and discusses Android’s suitability for real-time audio apps.

What’s changed?

Over the past four years we have taken a number of actions that have improved audio latency.

Latency reduction

These actions, coupled with a renewed focus from device manufacturers on audio latency, have led to significant improvements in the device ecosystem. The average latency of the most popular Android phones has dropped to under 40ms, which is well within the range required for real-time applications.

device popularity source: appbrain.com

Greater consistency

Digging into the data we can see that in 2017 there was a significant difference between the highest and lowest values (222ms).

device popularity source: appbrain.com

Compare that to the data for 2021. The range has reduced by a factor of 8 to just 28ms, providing a far more consistent audio experience. This is more impressive when you consider that there are now multiple OEMs on the most-popular list, compared to only a single manufacturer in 2017. In addition, many of the devices on the list are not high-end flagship models.

device popularity source: appbrain.com

Tap-to-tone latency

Up to now I’ve been referring to round-trip audio latency. Round-trip latency involves three components in the audio chain: audio input, audio processing and audio output.

Many real-time audio apps generate audio from screen tap events rather than relying on input audio. These kinds of apps are sensitive to “tap-to-tone” latency – the time taken from tapping on the screen to hearing a sound. The latency introduced by tapping the touch screen is anywhere from 10-35ms, with 20ms being fairly typical on modern Android devices.

To estimate tap-to-tone latency given round-trip latency, you can subtract the audio input latency (typically 5ms), and add the touch latency (typically 20ms). In other words, add 15ms to the round-trip latency. Given the numbers above, this means the average tap-to-tone latency of the most popular android phones is also well under that required for most real-time audio applications.

Looking to the future

Despite the significant reductions in audio latency across the Android ecosystem our work is nowhere near complete. 20ms round-tip latency is required for Android professional audio apps, and 10ms remains the long term goal. And at this time some less popular devices still have high audio latency. However, if you have been holding back on developing an Android app because of audio latency, it might be time to reconsider.

To get started, check out the Oboe getting started guide or video tutorials.

Data sources and tools

OboeTester

WALT

appbrain.com

superpowered.com/latency

gsmarena.com

juce.com/maq

various internal data sources