Monday, June 30, 2014

Android "L" Promises To Drastically Reduce Microphone Latency And Boost Maximum Audio Quality

2349283746_7ed48c9423_z

If we're being honest, it's hard to deny that one of Android's most obnoxious flaws comes in the category of audio performance. Playing some music is generally fine, but the issues start to become obvious after introducing very high quality audio or trying to achieve precise timing or real-time processing. With the L Developer Preview, it appears that Google is driving to improve upon these weaknesses and give audio performance the shot of adrenaline it needs. In a session at Google I/O 2014 titled "Building great multi-media experiences on Android," Glenn Kasten and Andy Hung took to the stage to explain the improvements appearing in the next revision of Android that can give us access to higher quality sound and greatly reduced lag in audio input.

The advantages for sound quality will come from shifting from 16-bit PCM to floating-point audio. This is about little more than widening the bandwidth for the audio pipeline and reducing the amount of clipping that can occur. According to the duo in the presentation, there should be little or no discernable impact on performance from switching to floating points, and the output will still remain in the form of integers, albeit higher than 16-bit. For the non-audio engineers in the crowd, the only thing you need to know is that Android L will be able to push very high quality audio, and that's going to be great for HD-quality sound. Code samples haven't yet been provided for using floating point audio, but it should be as simple as passing in the newly created ENCODING_PCM_FLOAT flag to the constructor of the AudioTrack class.

2014-06-30_07h45_10

There wasn't much of an explanation for how the team reduced microphone latency, but it was clearly a topic they were eager to demonstrate. Christian House from StarMaker Interactive was brought on stage to explain and demonstrate how his company's app could begin to give real-time feedback to people by using some new low-latency APIs on L. Glenn Kasten acknowledged that there's still a long way to go until the latency issue is truly licked. Unfortunately, it's still not entirely clear which APIs were added or changed, but it sounds like developers may have to stick to the NDK (Native Development Kit) and OpenSL ES to make any headway. Check out this page for more details.

While the improvements to audio are still a work in progress, it's fantastic to see that Android is closing the gap between itself and iOS. Hopefully, this will finally remove the biggest obstacle preventing real-time audio processing, mixers, and professional-grade studio apps from appearing on Android.

Thumb Photo: microphone by Matthew Keefe (CC BY 2.0)

Cody Toombs
Cody is a Software Engineer and Writer with a mildly overwhelming obsession with smartphones and the mobile world. If he’s been pulled away from the computer for any length of time, you might find him talking about cocktails and movies, sometimes resulting in the consumption of both.


source: androidpolice

0 comments :