Tradeoffs between Android Latency vs iOS Latency?

Patrick Vlaskovits

Questions from an audio developer on Android latency vs iOS latency:

Does Superpowered have any opinions on the tradeoffs between the two platforms, iOS and Android, given the concerns about audio latency below?

I have spent the last few hours trying to find an appropriate platform for a DSP development project, and I just ran across your website. It looks like EXACTLY what I am after. I’ve been looking for DSP development platform that minimizes the time between when I sit down and get started to when I can see real time audio flowing through a couple algorithms I’ve written, and provides a convenient UI for making parameter adjustments.

I began to realize that a tablet with an external audio interface was the right way to go, and then I began to get curious about libraries which leverage the NEON SIMD engine, And here it is!

What I’d like to get feedback on is whether to go with iOS or Android.

I have heard bad things about audio latency on Android, and since low latency is crucial for me, I was thinking that iOS was the way to go.

I see on your site that Jelly Bean is supposed to be better, and it seems to be implied that the superpowered framework makes things even better, but I’m unclear on how much. If iOS still delivers superior low latency performance, that is compelling.

We strongly recommend starting with iOS. Android still has several non-trivial audio problems:

Lack of low latency Android. Low latency audio available on a small number of devices only (some Nexus models), and latency is high on most, even very expensive models.

USB audio only available on a few devices only. Unfortunately, Android Lollipop doesn't solve this either.

On the other hand, I have done some programming in Objective C on the Mac and I really don’t care for it as compared to C#/Java or even C++. In principle, I much rather use Java for everything but the DSP code and C++ (and libraries such as yours) for the DSP. But what might seem nice in principle might not be as nice in practice, because of interop issues like the DSP being stalled by garbage collection in the Java code and the like.

For high performance, DSP code should be written in C or C++. Other languages have hidden blocking functions or mutexes (even Objective-C). In Java, when the garbage collector comes, DSP stops. Check out C++ Audio Library List (2018) here.

Basically, I’m looking for the most painless way to get my algorithms running with a functional UI to adjust parameters. Depending on how well my algorithms work in a music performance environment, I might try to build a hardware product around them. But it would probably be ARM based as well, so getting going with a NEON platform up front just puts me ahead of the game.

And that brings me to a final question: Have you tried to get your library working in an embedded Linux environment?

As the Superpowered Audio SDK has no third-party dependencies (can be thrown into any pure C++ project), theoretically it runs without any problems in an embedded Linux environment. Especially since it runs in Android's native layer too, which is a Linux itself.

You can create cross-platform code in C++. It will work in both iOS and Android (check Android NDK). But for now, start with iOS, as the audio market is there, and you'll have significantly fewer technical issues.

Android Latency vs iOS Latency

  • Android
  • Android Ndk
  • Arm Architecture
  • Audio Latency
  • Audio Problems