Low Latency Audio. Cross Platform on Android, OSX and iOS. Free.
Android's 10 Millisecond Problem Mobile Audio Latency Test App Android Audio Player USB Audio and MIDI for Android
In a series of extremely popular articles we explained Android’s audio architecture problems, preventing entire categories of apps from being built on an otherwise great and incredibly popular platform. We updated our findings with the recent improvements in Android M (Marshmallow), and recently released a solution for Android’s USB audio and MIDI challenges, opening a market of 1.1 billion devices for pro audio application creators.
Our testing, technical analyses and audio latency measurement database of more than 4,238 different Android models/builds shows that Google has been making great progress in order to solve the Android round-trip audio latency problem, however progress seems to be slowing as the current media server internals are not likely to be hacked much further unless fundamental changes should happen. To date, we have seen no improvements with Android N with regards to audio latency.
We receive emails from all around the world, almost on a daily basis, where developers beg us for a solution to Android Audio’s 10 ms Problem. Which is why we’re proud to announce a solution to Android Audio 10ms Problem, which you can install and demo today.
Want to embed this image? Copy the following code:
<a href="http://superpowered.com/superpowered-android-media-server"><img src="http://bit.ly/24Fg1Km" alt="Android Media Server" title="Android Media Server Audio Path Latency" /></a><br />Learn more about <a href="http://superpowered.com/superpowered-android-media-server">Android's 10 Millisecond Problem and Solution</a>.
The useful definition of round-trip audio low latency is:
+ Audio Input (time)
+ Audio Processing (time)
+ Audio Output (time)
= 10 milliseconds or less.
This is the necessary highest bound latency for interactions in apps to be perceived as natural and immersive. Even a few milliseconds more latency will makes listeners and app-users uncomfortable (albeit they won’t be able to tell you why.) Readers will note that iOS has been low latency since the iPhone’s introduction in 2007.
As of June 2016, the best official Android audio latencies stand at:
|Model||Android Version||Buffer Size|
|Nexus 9||6.0.0 (MRA58K)||128||15|
|Nexus 6P||6.0.0 (MDA89D)||192||18|
Most misconceptions as to why Android doesn’t offer low latency center around the following three themes:
It’s a hardware problem.
It’s a Linux audio problem.
It’s the ALSA drivers.
Based on our research and development, while minor issues exist in each area, none of the aforementioned are insurmountable or fatal. The official Superpowered Inc opinion is they’re all completely acceptable.
Ultimately, the Android audio tack has fundamental architectural problems stemming from engineering decisions made at Android’s genesis, well before Google’s acquisition of Android.
For a comparison of Android integrated with the Superpowered Media Server for Android vs Android unaltered, audio latency is measured across three different audio paths.
|Audio Path||Without Superpowered||With Superpowered|
|Inbuilt speaker to inbuilt mic||32 ms||24 ms|
|Audio output plugged into headphone jack and inbuilt microphone||15 ms||9 ms|
|Audio Loopback Dongle||15 ms||9 ms|
|Audio Path||Without Superpowered||With Superpowered|
|Inbuilt speaker to inbuilt mic||25 ms||19 ms|
|Audio output plugged into headphone jack and inbuilt microphone||14 ms||8 ms|
|Audio Loopback Dongle||14 ms||8 ms|
The Superpowered Media Server for Android is injected between the Android Audio HAL (which handles the audio driver) and the Android media server (the system component handling audio).
It allows for applications to bypass the Android media server, meaning that apps benefit from:
The Superpowered Media Server does not affect audio system routing, system applications, notifications or any other Android audio feature. It is 100% compatible with existing Android audio functionality, and it has absolutely no effect on applications not designed to to interface with it.
In plain English, any app will work just fine on an Android build with Superpowered Media Server, whether the app decides to use the Superpowered Media Server audio path or not. Every feature of the Android media server will work without any change.
Lastly, if no application requests Superpowered audio access, Superpowered Media Server uses zero CPU overhead.
The Superpowered Media Server:
It uses the HAL and connects to user applications in a novel way. The purpose of this demo is to demonstrate that:
Paramountly, the new Superpowered Media Server audio path works as a ‘pull mechanism’, while the current Android media server is a ‘push mechanism’. Using pull, the audio driver dictates when the media server and the user application should produce the next buffer of audio, whereas in ‘push’, the media server or the user application shoves the next buffer of audio to the audio driver whether it is ready or not.
In push, the tail wags the dog.
Because pull reduces the risk for dropouts, and handles audio “in the rhythm of the audio device” is the standard for professional audio systems like Mac OSX.
The installation procedure is relatively easy and doesn’t require a new Android build. It can be installed on any Android userdebug build or rooted production build.
The Superpowered Media Server demo currently supports:
Installing on Samsung Galaxy devices is not recommended, because the HAL/audio driver adds additional latency to support the audio shortcut for the Samsung Professional Audio SDK.
The package contains:
The modified latency and audio glitch measurement apps are prepared to use Superpowered Media Server audio path, if that’s available.