Live data from Hacker News

An update on Android's audio latency

android-developers.googleblog.com

81–90 of 171 posts

Re: An update on Android's audio latency

#81

Earlier quoted context omitted.

I've never understood why Wi-Fi latency is only 2-3ms while Bluetooth is 100-200ms when they use the same frequency band. Is it intentional to ensure there's plenty of buffer so audio packets can be re-sent when they fail, and the audio is seamless? In other words, is 100-200ms just inherent at that frequency with expected interference? Or is it actually just terribly designed?

I'd assume a combination of larger buffers for seamless error recovery and also for lower power consumption. The receiving side of that bluetooth connection is also typically extremely battery constrained.

Oh I'd never considered lower power consumption as a reason for increased latency.

I don't immediately see the relationship however -- is there anything you could point me to, to explain the mechanism?

Re: An update on Android's audio latency

#82

Earlier quoted context omitted.

I'd assume a combination of larger buffers for seamless error recovery and also for lower power consumption. The receiving side of that bluetooth connection is also typically extremely battery constrained.

Oh I'd never considered lower power consumption as a reason for increased latency. I don't immediately see the relationship however -- is there anything you could point me to, to explain the mechanism?

To have minimal latency basically everything needs to stay active constantly. CPU is constantly awake sending or receiving data. Radio is constantly awake. Interconnects constantly awake. If you instead send a large buffer, you can sleep between bursts of work. Dropping to lower power states in the interim, and only a small DSP doing the audio output needs to be awake.

Re: An update on Android's audio latency

#85
Up to now I've been referring to round-trip audio latency. Round-trip latency involves three components in the audio chain: audio input, audio processing and audio output.

I read through the whole article and that's the most detail given about any testing methodology; I don't see any more description of how these numbers are being measured.

My rule of thumb for computer speed measurements and efficiency has always been in terms of CPU instructions; the goal of 10ms, while seeming very tiny, is still roughly ten million instructions of a 1GHz CPU. The other numbers mentioned are proportionally more, which then makes one wonder where all the time is being spent.

Relatedly, I've actually written audio drivers (HD audio for Windows 3.x/9x, long story but I won't digress...) and the output latency measured from the app writing a buffer to the signal appearing at the headphone jack is probably in the dozens to hundreds of microseconds range (thousands of CPU instructions, including virtualisation overhead) at most --- but those OSs have extremely thin abstraction layers, and the call stack between the app and writing to the hardware registers is very shallow.

The fact that newer hardware/software seems to have more audio latency reminds me of this: https://danluu.com/input-lag/

Re: An update on Android's audio latency

#86
post #33

Earlier quoted context omitted.

Perhaps you should read the article in full. It clearly says the most popular Android smartphones in 2021 are: Samsung Redmi Oppo Huawei Vivo Which probably account for the majority of Android smartphone sales.

Perhaps you should read the article, "Latency of the most popular android phones in Jan 2017" list only 20 samsungs.

Why would you reference a 4 year old graph when the 2021 graph was right below with current latency measurements of the Most Popular Android Phones.

Re: An update on Android's audio latency

#87
post #58

Earlier quoted context omitted.

The best I could find was https://developer.apple.com/forums/thread/71301 which suggests a 32ms touch latency. I think that might include some processing, but it doesn't seem much better than the 20ms latency in Android mentioned in the article. The audio processing latency seems to be single digit on both systems. In any case, I don't think these differences are big enough to argue that "Android can't be used for in…

Yeah, I think the numbers in the article should be good enough for a bunch of music use cases, but remember it used to be like half a second which is obviously unworkable. Well financed developers like ROLI already have instruments on android. I think the incredible instruments available on iOS are also there because the App Store promise actually kind of works for them. They write a great application, upload it to s…

I released free AUv3 ports of mutable instruments modules, turned into instruments. Look up Spectrum Synthesizer Bundle on App Store.

Re: An update on Android's audio latency

#88

Off topic, but would be nice if they could do something - presumably far simpler - about the lack of fine-grained volume control. It might be a niche case, but it's really frustrating using the various sleep-related audio apps at night with earphones and not being able to select a minimum volume that is both loud enough to hear but not so loud it keeps you awake (example: Audible with a sleep timer). I'm sure there a…

That sounds involved but 100% doable using synthesized volume limiting in-app.

Have you tried pestering Audible? Would probably take a while, but it feels like the kind of thing that would be hard to "un-justify" once you started arguing for it.

Re: An update on Android's audio latency

#89
post #69

Earlier quoted context omitted.

What's funny is that this “open” environment of android now is nearly the opposite. With any android device openly spying on you while locking down all the open source apps you might want to install.

What does this mean? I can choose not to install google services in my phone, and use an open app store like F-Droid. Not that it counts for much in the grand scheme of things, seeing as 99% of users will never install a custom rom.

I like how the second line of your comment answers the first.

Re: An update on Android's audio latency

#90

Too little, too late, I'm afraid. The improvement is great, but I think the audio professionals jumped ship long ago to Apple, and they're not going back. I know of several music professionals plugging into their Macbooks or iPads as part of the pre-amp, but I don't know if any using Android. Google sat on this for way too long while Apple courted the creative professionals, and for any that have already made the upf…

Perhaps. Though I wonder if every musician afford Macbooks or iPads. These things are not cheap, especially if you consider earnings of non-US based musicians, etc. Disclaimer: Googler, but opinions are my own.

Pirated copies of FL Studio on cheap windows PCs/Laptops have been the lifeline for a lot of third-world musicians for more than a decade.
Post reply on HN