Posted by Don Turner – Android Developer Relations Engineer

Header image of audio waves going through phone

This write-up has a look at what’s altered in the Android environment for audio programmers lately, the audio latency of preferred Android tools, as well as reviews Android’s viability for real-time audio applications.

What’s altered?

Over the previous 4 years we have actually taken a variety of activities that have actually enhanced audio latency.

timeline of key events which have had an impact on the audio latency of Android devices. Pre-2017: Google working directly with OEMs to reduce audio latency. Start 2017: AAudio - new high-performance audio API is released. Mid-2018: Oboe - an open source, C++ wrapper for AAudio and OpenSL ES is released. Mid 2019: Pixel 3A is the first 10ms Android phone. Mid 2020: OpenSL ES is deprecated. Start 2021: Oboe has 4bn+ installs

Latency decrease

These activities, combined with a restored emphasis from gadget suppliers on audio latency, have actually resulted in considerable enhancements in the gadget environment. The typical latency of one of the most preferred Android phones has actually gone down to under 40ms, which is well within the variety needed for real-time applications.

bar graph showing average audio latency of 20 most popular Android phones. In Jan 2017 it was 109 milliseconds. In Jan 2021 it was 39 milliseconds.

gadget appeal resource: appbrain.com

Greater uniformity

Digging right into the information we can see that in 2017 there was a substantial distinction in between the greatest as well as most affordable worths (222ms).

bar graph showing audio latency of most popular Android phones in Jan 2017. There are 19 in total, all of which are Samsung Galaxy models. The average latency is 109ms, smallest value is 36ms, highest is 258ms, range is 222ms.

gadget appeal resource: appbrain.com

Compare that to the information for 2021. The variety has actually decreased by a variable of 8 to simply 28ms, offering a much more constant audio experience. This is extra excellent when you take into consideration that there are currently several OEMs on the most-popular checklist, contrasted to just a solitary maker in 2017. In enhancement, a lot of the tools on the checklist are not premium front runner designs.

bar graph showing audio latency of most popular Android phones in Jan 2021. There are 20 in total, with models from Samsung, Redmi, Oppo, Huawei and Vivo. The average latency is 39ms, smallest value is 28ms, highest is 56ms, range is 28ms.

gadget appeal resource: appbrain.com

Tap-to-tone latency

Up to currently I’ve been describing round-trip sound latency. Round-journey latency includes 3 elements in the sound chain: audio input, audio handling as well as audio outcome.

Many real-time sound applications produce sound from display faucet occasions instead of counting on input sound. These sort of applications are delicate to “tap-to-tone” latency – the moment drawn from touching on the display to listening to a noise. The latency presented by touching the touch display is anywhere from 10-35ms, with 20ms being rather common on modern-day Android tools.

To price quote tap-to-tone latency offered round-trip latency, you can deduct the audio input latency (usually 5ms), as well as include the touch latency (usually 20ms). In various other words, include 15ms to the round-trip latency. Given the numbers over, this implies the typical tap-to-tone latency of one of the most preferred android phones is likewise well under that needed for the majority of real-time sound applications.

Looking to the future

Despite the considerable decreases in audio latency throughout the Android environment our job is no place near full. 20ms round-tip latency is needed for Android specialist sound applications, as well as 10ms continues to be the long-term objective. And currently some much less preferred tools still have high sound latency. However, if you have actually been keeping back on creating an Android application due to audio latency, it could be time to reevaluate.

To start, look into the Oboe starting overview or video clip tutorials.

Data resources as well as devices

OboeTester

WALT

appbrain.com

superpowered.com/latency

gsmarena.com

juce.com/maq

different inner information resources