Audio Improvements in Android 5.0 L [Audiophile]

Android 5.0 (L-Release) is set to improve Audio and Video experience by huge margin.

Not only does Android 5.0 enables Pro Photography, it will be welcomed by audio processing applications including composition, production and karaoke for the first time.

android-dac-audiophile

Audio on Android had sucked big time. There was not just output delay (which was fixed by a good margin in KitKat); there is significant input delay as well. The delay is sometimes as large as 600ms, thereby making it a deal breaker for Audio processing enthusiasts. With recent changes to L release, its all changing for good.

Let’s go over all the Audio improvements in Android 5.0 aka L release:

1. Low latency (Input / Output) – Audio patch-panel

Kitkat introduced OpenSL based accelerated audio to reduce output audio delay, but it was still high enough to be usable for Audio processing apps.

With Android 5.0 comes Audio patch-panel that ensure significantly lower input-latency (~20ms) which is not perfect but very usable. Output latency and whole audio processing is also accelerated to reduce significantly, to enable Real-time audio for the first time.

2. 24bits per sample

Sample resolution is up from 16bit PCM to 24bit for better precision. In Kitkat and older releases, Android was 16bit per sample throughout the processing system. Even though several 2013 and newer phones supported24bit 96khz DAC, Android core never really made use of it. Some OEMs like LG did make alter the Android AudioFlinger and kernel to leverage 24bit but it was never contributed back to Android community.

3. 96khz sampling rate

Yes, up from 44khz/48khz, now Android supports 96khz sampling rate.

4. Floating point for Sampling

Floating point is a scary word for every programmer coz not only its costly (double the memory), its painfully slow. Google is trying to change the impression Floating points have. They have made the whole Audio system floating point compatible, arguing that FPs are as fast as Integers on modern SIMD processors, and the advantages are significant. Immediate advantages of using FPs are:

  • No audio clipping
  • Better precision – Better quality
  • Better dynamic range
  • greater headroom

Floating-point arithmetic is especially useful during intermediate calculations. Playback end-points use integer format for audio data, and with lower bit-depth. (In the L Developer Preview, portions of the internal pipeline are not yet floating-point.)

audio-input-output-android5

For developers: Use android.media.AudioFormat.ENCODING_PCM_FLOAT

5. Better Resampling

Android 5.0 improves on the Linear interpolator used to resample audio streams. Most audio files have either 44khz or 48khz or 96khz sampling. In order to play jitter free, it needs to be resampled if it doesn’t match the phone’s DAC supported sampling rate. e.g. Nexus 5 supports 48khz sampling rate. So in order to play a 44khz Mp3, it must be resampled to 48khz. Resampling is a mess in pre-5.0 Androids coz the linear interpolator adds lots of aliasing and artifacts.

audio-resampler-android5

5.0 Resampler is written ground up for minimal resampling aliasing by increasing sampling to twice.

audio-aliasing-android

6. Improved AV sync

Android had Audio and Video sync problems (of the order of 10 – 100ms) since a very long time now. Finally it has been addressed with new synchronized methods that ensure audio track matches with video keyframes, at all times.

7. USB audio

Yes, USB audio is now officially supported. Out of the box, you should be able to use external Soundcards (or DAC) and route all audio through it. This is a big news for Android Audiophiles who use USB DACs like Fiio E7, Meridian Explorer, Audioquest DragonFly DAC checkout this thread for USB DAC compatibility list.

8. API improvements (For developers)

  • Your app can now supply audio data as a ByteBuffer, in the same format as provided by MediaCodec.
  • New NDK Media APIs
  • The WRITE_NON_BLOCKING option can simplify buffering and multithreading for some apps.

We write latest and greatest in Tech GuidesAppleiPhoneTabletsAndroid,  Open Source, Latest in Tech, subscribe to us @geeknizer OR on Facebook FanpageGoogle+

GD Star Rating
loading...
GD Star Rating
loading...
Audio Improvements in Android 5.0 L [Audiophile], 8.2 out of 10 based on 34 ratings

10 thoughts on “Audio Improvements in Android 5.0 L [Audiophile]”

  1. Cool. Hope this also fixes the audio skipping when listening to music, happens a lot, and my music is on my device!

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply
    • if it’s in your device or streaming it is still being written to the audio buffer, this is currently handled inefficiently causing blocking on thread. should be resolved with 5.0

      GD Star Rating
      loading...
      GD Star Rating
      loading...
      Reply
  2. That means Traktor should now finally come to Android,no more excuses.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply
  3. I’ve been hearing placative promises from Team Android about fixing what’s wrong with its audio for 5 years now, I think. It’s a punchline at this point.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply
  4. Why can’t it just output 44.1k material as is without resampling to 48k and adding some error. Even windows gives you an option of choosing the output sampling rate

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply
    • Because You need to resample to 48 kHz in many cases. That’s what DACs support most of all. Now Android 5.0 resampler has very high quality. It’s transparent.

      It’s actually audibly better to resample 44.1 kHz to 48 kHz in order to get best possible quality out of your mobile DAC.

      GD Star Rating
      loading...
      GD Star Rating
      loading...
      Reply
      • Resampling kills embedded formats like DTS Audio CDs that have been ripped to be played via iTunes on AppleTV or in this case on Kodi using FireTV (Stick). Actually, worse yet, Kodi outputs 44.1 DTS Audio CDs to 48kHz DTS intact, which means the PITCH of the entire track is too high (not quite Chipmunks high, but enough to sound very very odd). This is now 2015 and almost 2016. DACs that can multiple rates can be had as external add-ons for $20 even (I have one in my analog system to use digital sources) so there’s literally no excuse for these devices being purposely impaired. If they are using digital output, it should have the option to output all signal rates of the original source and let the playback equipment decide.

        What’s truly sad is that the 1st Gen Apple TV did 44.1 and 48kHz correctly and now newer Apple TV units and Android both can’t manage what a stinking DVD player did correctly in 1994….it’s unreal. Who are these programmers and why haven’t they been fired yet for not doing a proper job with audio?

        GD Star Rating
        loading...
        GD Star Rating
        loading...
        Reply
  5. Turns out a lot of the promised improvements listed in this article did not make it into Android 5.0. Namely 24bit/96khz output. Who knows what else got the axe? Google is amazing at announcing stuff loudly, then backtracking silently.

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply
  6. Good explanation Tarandeep !
    I need help, I spend already so much time on the next..
    I bought the brand new fast Android box from Zoomtak model :T8U wich is with Android 5.1.1., harddisk space and optical and analog output.
    I use the optical out to connect to a D/A converter in my Marantz audio system. The media box wil only send 48KHz out while the music on my harddrive is in 24/96KHz. The samplerate converion is also not good because there is a audio distortion wich makes a wha-wha sound effect, My formal TV box was running fine and also the samplerates did work fine with a passtrough setting.
    Question:
    Is there a setup file to copy or a app wich makes the android TV box a audiophile device?

    GD Star Rating
    loading...
    GD Star Rating
    loading...
    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.