Live data from Hacker News

Sub-10ms roundtrip audio latency on Android

superpowered.com

41–50 of 50 posts

Re: Sub-10ms roundtrip audio latency on Android

#41
post #37

Earlier quoted context omitted.

Short answer: abstraction layers. Because Android has to be able to run on so many devices there are a bunch of abstraction layers between the app and the hardware, all adding delay. iOs does not have this issue.

I bet your iOS also has some abstraction layer, I doubt you get to poke DAC chip registers directly from userspace. Superpowered Media Server is an abstraction layer too and so are desktop OS audio APIs. And yet, they don't suck as badly.

On iOS, you'd at least be running audio code on native code without garbage collectors or other expensive runtime features. Native apps with low latency wasn't what Android was originally intended for.

Apple has the best audio stack out of the box anyway (desktop and mobile). There are very few music apps for Android, a lot of music apps are iOS only (or target a select few Android devices).

Re: Sub-10ms roundtrip audio latency on Android

#42
post #40

"It can be installed on any Android userdebug build or rooted production build." "Installing on Samsung Galaxy devices is not recommended" So, not for apps on devices today.

You're correct. It doesn't seem to be for consumer oriented products today . But it's a start... I guess they're targetting some professional audio gear that have an Android-based component in it. Or hope to get this sold to phone/tablet vendors who would like to build a music-oriented product. Or get acquired by Google and get integrated into Android proper. Or just make Android a viable backend for their cross-plat…

Hi there,

We're licensing the Superpowered Media Server to OEMs who want to differentiate their Android build by bringing latency down to pro audio levels.

As we say in the article, we squeeze latency out of user space with our zero latency SDK as well as out service space with our new server.

Re: Sub-10ms roundtrip audio latency on Android

#43
post #38
post #34

So why is this so hard for Android but seemingly easy for every other OS out there?

The article kind of touches that: "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." Much of Android was designed for simple apps written in Java and running on resource-constrained devices. This is quite far from the reality of today. Perhaps it allowed Android to get to the market ear…

Doesn't have to be less than 5ms -- ~10ms and below (like iOS demonstrates) is great.

Re: Sub-10ms roundtrip audio latency on Android

#44
can someone explain the practical use case?

- future apps can implement the code for less latency on the current android version?

- future roms can have less latency with this code?

- existent apps can have less latency with a 3rd party app helping?

- I need the loopback dongle?

Re: Sub-10ms roundtrip audio latency on Android

#45
post #40

Earlier quoted context omitted.

You're correct. It doesn't seem to be for consumer oriented products today . But it's a start... I guess they're targetting some professional audio gear that have an Android-based component in it. Or hope to get this sold to phone/tablet vendors who would like to build a music-oriented product. Or get acquired by Google and get integrated into Android proper. Or just make Android a viable backend for their cross-plat…

Hi there, We're licensing the Superpowered Media Server to OEMs who want to differentiate their Android build by bringing latency down to pro audio levels. As we say in the article, we squeeze latency out of user space with our zero latency SDK as well as out service space with our new server.

What is the business case here? A provider of audio software can write an iOS app that will out of the box avoid these latency issues for the variety of iOS hardware out there, or they can take on the task of creating hardware, customizing Android, using your media server and SDK, in order to avoid those latencies on Android.

One path seems easier and cheaper than the other...

Re: Sub-10ms roundtrip audio latency on Android

#46

Earlier quoted context omitted.

Hi there, We're licensing the Superpowered Media Server to OEMs who want to differentiate their Android build by bringing latency down to pro audio levels. As we say in the article, we squeeze latency out of user space with our zero latency SDK as well as out service space with our new server.

What is the business case here? A provider of audio software can write an iOS app that will out of the box avoid these latency issues for the variety of iOS hardware out there, or they can take on the task of creating hardware, customizing Android, using your media server and SDK, in order to avoid those latencies on Android. One path seems easier and cheaper than the other...

If you want to develop an app that depends on low latency such as an interactive audio app or DAW, then on iOS that is entirely doable.

If you want to do the same on Android, or port that same app from iOS to Android, than that is virtually impossible.

From: http://superpowered.com/androidaudiopathlatency

"Many mobile apps that are critically dependent on low latency audio functionality such as some games, synthesizers, DAWs (Digital Audio Workstations), interactive audio apps and virtual instrument apps, and the coming wave of virtual reality apps, all of which thrive on Apple's platform (App Store + iOS devices) --- and generate big revenues for App Store and iOS developers are largely non-existent on Android. Android Audio's 10 Millisecond Problem, a little understood yet extremely difficult technical challenge with enormous ramifications, prevents these sorts of revenue producing apps from performing in an acceptable manner and even being published (!) on Android at this point in time. Startups and developers are unwilling to port and publish otherwise successful iOS apps (with ~10 ms audio latency needs) on Android for fear of degraded audio performance resulting in negative word-of-mouth and a hit to their professional reputation and brand. Consumers lose because have a strong desire to buy such apps on Android, as shown by revenue data on iOS, and currently, are unable to do so. One can appreciate the scale of this problem/opportunity when one takes into account the so-called 'next billion' consumers who will be 'mobile-only'."

No app developer will, as you describe:

"take on the task of creating hardware, customizing Android, using your media server and SDK, in order to avoid those latencies on Android."

But OEMs seeking to differentiate their Android builds will integrate Superpowered Media Server, allowing for low latency functionality.

Re: Sub-10ms roundtrip audio latency on Android

#47

can someone explain the practical use case? - future apps can implement the code for less latency on the current android version? - future roms can have less latency with this code? - existent apps can have less latency with a 3rd party app helping? - I need the loopback dongle?

The practical use case is that you will see commercial Android builds that will have integrated the Superpowered Media Server, allowing Android to become the great music and entertainment platform it should be.

Re: Sub-10ms roundtrip audio latency on Android

#48

can someone explain the practical use case? - future apps can implement the code for less latency on the current android version? - future roms can have less latency with this code? - existent apps can have less latency with a 3rd party app helping? - I need the loopback dongle?

The practical use case is that you will see commercial Android builds that will have integrated the Superpowered Media Server, allowing Android to become the great music and entertainment platform it should be.

thanks. Great!

Re: Sub-10ms roundtrip audio latency on Android

#49
I'd be interested in seeing what the android devs could do if they included specs for FPGAs into phones.

I think that would be a very fast way to get android to connect any IO to any configuration they need very quickly.

There also seems to be a growing trend to include ARMs inside actual FPGAs.

Re: Sub-10ms roundtrip audio latency on Android

#50
post #33

Earlier quoted context omitted.

What about for application in a headphone? You wouldn't have issues with changes in distance, as your ears would always be a set distance away from the drivers. For example, what is the latency on Bose's QuietComfort 25?

You would need a latency of something like 0.01ms or even less. If I remember right such a low latency is basically impossible, so sound canceling headphones have to try to predict the sound before it happens. There are large problems with simply the speed of sound - you don't really have time to emit the new sound, and if you move the mic farther from the speaker you don't accurately match the sound, and can make th…

I would imagine that the physical inertia of the speaker would also be a factor.

Opamps can respond that quickly electrically, but you need more power the faster you want to move the speaker cone.

Say the mic is 5mm from the speaker. Sound travels at 340m/s. so 0.005/340=0.00001471s. So it takes 14.71 microseconds for the sound wave to travel that 5mm. That sounds awfully quick to have to reactively move a speaker cone accurately. Obviously speakers can move quickly enough to play at the correct frequencies but I don't know what their latency would be.

I'm sure there are other complications that I'm forgetting but it's definitely harder than you would think to cancel out sounds.

Post reply on HN