Saying your device isn’t as responsive to sound as you’d want is a bit like saying you’re feeling sick to your stomach. The symptom is easy to describe, and everyone would agree it’s not a desirable state. But the fix can be rather complex.
And when it comes to engineers who care about music and sound, experiencing latency – or its equally evil mirror cousin, crackles-and-pops – will make you sick to your stomach.
Google I believe is deserving of some criticism over this issue. Years of subsequent updates saw the company largely silent or unresponsive about critical audio issues. It took some time before even basic APIs were reliable and on par with other platforms. At the same time, I don’t believe even all developers – let alone users – appreciate the challenges of making music-quality low latency performance work. There’s no silver bullet: any number of issues with drivers and firmware and battery management can cause things to go wrong, and only a delicate combination of ingredients will make it go right. Indeed, that’s part of why Apple deserves some credit. Being the company making both hardware and software is a big boon, no question, but even that is no guarantee you’ll get results.
One year ago now, we first saw signs that Android would see higher performance audio. This included some general improvements for all newer devices, which my friend Peter Brinkmann quickly baked into the open source libpd library. Low latency audio was promised initially for the Samsung Galaxy Nexus, as I reported, as well, in June.
At this year’s Google I/O, we finally get a presentation from people who really understand the issues involved and explain in atypically-candid detail how you go about solving them.
If you care about this, too, you owe it to yourself to sit through the whole video, as there’s a whole lot of technical detail here. It’s also worth noting that some of the things you think might fix audio actually don’t. Sure, it’s easy for developers to gripe that a platform doesn’t magically give them low latency audio, particularly if they’re familiar with desktop Linux. But on mobile platforms, a number of variables come into play. Some of the obvious fixes can then conflict with battery life, or simply don’t work.
The full video, featuring Glenn Kasten, Ian Ni-Lewis, and Raph Levien:
It’s a pleasure to see engineers who really get this stuff talk about this rather than higher-level managers; this is the sort of conversation I have over beers with people who know what they’re doing far more than I do.
A key slide:
The left-hand column, what the Android team needs to do, is summed up in two areas. One is improvements to the platform, and the other has to do with working with hardware partners, whose drivers and hardware and well-meaning battery conversation features and the like are often the source of problems. Most tellingly, while it’s long overdue, it’s good to know that Google is at last adding proper APIs for configuring audio (augh), and being trying more adventurous paths to lower latency as have been found more commonly on desktop systems.
But developers can make headway, too. As evidenced by the availability of software like FL Studio showing up on Android, programming techniques and the use of OpenSL can mean better performance on the platform, as well.
I’ve endorsed it before, but even if you don’t intend to use the free libpd library, you can check out the repository for the latest best-practices code for you to copy and paste in your own Android audio apps:
Check out the OpenSL branch.
So, which Android should you get (if any)?
This time last year, we heard about low latency support for specific devices on Android. How are they doing?
Well, frankly, not great. There are three devices that support the low latency profile, up from one device at Google I/O last year:
1. Galaxy Nexus (Samsung)
2. Nexus 4 (LG)
3. Nexus 10 (Samsung)
Certainly, I would only recommend these three Android devices to anyone interested in music or development. Other Android gadgets will perform more poorly with audio latency, including popular devices like the Galaxy S series. You’ll also want a Nexus device in order to have unfettered access to OS updates from Google – useful to developers, but also to anyone wanting to keep pace with improvements.
And of these three, the Galaxy Nexus remains the best choice. Sources tell CDM that the Nexus 4 and Nexus 10 don’t perform as well as the original Galaxy Nexus because of battery conservation concerns.
I still strongly recommend iOS for developers and end users, however. For now, Android can’t match app selection, API quality, availability of MIDI support and wired connections to instruments, or audio performance and flexibility available on iOS.
That said, a Galaxy Nexus could be a great buy for people willing to tinker a bit. Oh, yeah, and there’s the fact that you can get it unlocked for a fraction of the price of a new iPhone.
CDM will have more on these issues over the summer, so stay tuned.
Developers, details from this presentation:
https://code.google.com/p/high-performance-audio/