Live data from Hacker News

An update on Android's audio latency

android-developers.googleblog.com

131–140 of 171 posts

Re: An update on Android's audio latency

#131
post #125

Earlier quoted context omitted.

Totally agree. We should not forget that our brain is great at adjusting to latency. In the old days, when I was excessively playing Quake 3 Team Arena it took me just a couple of minutes to adjust to network latency depending on the server I was connected to. Professional musicians do this constantly and are much better at that.

What. Our brain is absolutely terrible at adjusting for latency. It can somewhat compensate, but only to an extent, and at severe cost. There’s this video around that puts people in a VR helmet playing A/V with a delay, even the lowest setting completely destroys any form of efficiency. Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency. Playing Super Mario Bros in…

> Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency.

I think there is a subtle difference between fps (avg) and latency. I would say that a 'stable' latency is always better than a high fps.

> Try Guitar Hero / Rock Band with various audio / video latency settings. 10ms is obviously impactful, anything higher borderlines on unplayable, and even 5ms has a subtle impact increasing missing notes.

Do you mean that you set an additional latency for both video and audio? Or you delay only the audio by 10ms?

Re: An update on Android's audio latency

#132
post #25

It'd be nice if something was done about the extra 100-200ms (!!) of latency that Bluetooth headsets can add[1]. I understand this is largely a problem from the manufacturer problem, but I'd love to see Google lead the way with some sort of certification program, or even make their own low cost BT chipset for 3rd party headphones to use, to improve the situation. Of course Android is already world's better than deskt…

There is AptX LL (low latency). I have no idea how widespread support is, but you can buy BT dongles, eg to connect video equipment.

Re: An update on Android's audio latency

#133
post #125

Earlier quoted context omitted.

What. Our brain is absolutely terrible at adjusting for latency. It can somewhat compensate, but only to an extent, and at severe cost. There’s this video around that puts people in a VR helmet playing A/V with a delay, even the lowest setting completely destroys any form of efficiency. Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency. Playing Super Mario Bros in…

Input in NES is not lag's source. Input is only read once per frame. Today it is very simple and cheap to improve over old controllers. Lag comes from video. If you do not use FPGA emulators like Mister the video delay is enormous. I don't understand what you are calling 10ms lag. Have you measured the delay between your computer and your screen? It is way bigger than that, in any computer or NES console(console-TV).…

> Input in NES is not lag's source. Input is only read once per frame.

That’s exactly what I said ;) By virtue of being a different platform, emulation introduces a lag that is just not present on the real hardware (and can’t be lower by virtue of literally being a wire to memory). USB alone often introduces an astoundingly high minimal floor on latency.

> I don't understand what you are calling 10ms lag. Have you measured the delay between your computer and your screen? It is way bigger than that, in any computer or NES console(console-TV).

Yes I have measured it (on all my devices, accurately so) in order to minimise it as much as possible (I can work with but can’t stand latency, even in a terminal).

Rock Band, which I used to be an avid player of, allows you to adjust a relative delay (audio and video separately), timewarping A/V so that all three are perfectly in sync relative to real-world input.

> Network delay is inconsistent, but electronic delay is not.

I agree (and agree to buffers as well), but by and large any modern device is far removed from being just electronic, from USB (USB 2.0 has a 125us polling loop for multiplexing, USB 3 is point to point so can fare much better at 30us, but even then there’s kernel context switch to read and process that data) to HDMI (packet based with loads of multiplexing), many things end up being surprisingly subject to soft-real-time firmware/software before it hits the display itself. Hard real time stuff probably exists because the specs now allow for it but good luck finding that in consumer space where it’s much easier (read: cheaper) to push a best effort implementation.

But my point isn’t about the minutiae of lag source, it’s that the human brain is severely impacted by lag, can adjust to some extent but the cost is paid heavily at multiple levels and with various efficacy crippling consequences; and that Q3 and subsequent games have increasing numbers of facilities to create the illusion that everything happens in sync so that we’re not so impacted by it.

Re: An update on Android's audio latency

#134
> The average latency of the most popular Android phones has dropped to under 40ms, which is well within the range required for real-time applications.

Uh.... It needs to be at least 10 times faster to claim realtime use

Re: An update on Android's audio latency

#135
post #54

Earlier quoted context omitted.

To be a little pedantic: He is not claiming that producers are never using PCs, he is claiming that live audio never runs on PC, because stability is the top priority there. Later he says in the studio you can tolerate a little instability if the other benefits of windows are worth it. That no producers are using windows PCs is an obviously false claim. There are DAWs that don't even run on mac. There are also live p…

> That macs are more stable in day-to-day operation is not really a bold claim though. It absolutely is. Do you have any data to back up the claim? Anecdotally windows 10's stability seems vastly superior, especially with every release of MacOS seemingly regressing further and further.

I just ran ‘uptime’ on my Mac terminal. 194 days. I pretty much never reboot the thing. It’s just always stable, despite hundreds, maybe thousands, of sleep-wake cycles, usually a dozen apps open at one time, the thing is as stable now as it was when I rebooted it some six months ago.

I used to use windows, for a decade, and certainly never had any experience like that.

Re: An update on Android's audio latency

#136
post #125

Earlier quoted context omitted.

Totally agree. We should not forget that our brain is great at adjusting to latency. In the old days, when I was excessively playing Quake 3 Team Arena it took me just a couple of minutes to adjust to network latency depending on the server I was connected to. Professional musicians do this constantly and are much better at that.

What. Our brain is absolutely terrible at adjusting for latency. It can somewhat compensate, but only to an extent, and at severe cost. There’s this video around that puts people in a VR helmet playing A/V with a delay, even the lowest setting completely destroys any form of efficiency. Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency. Playing Super Mario Bros in…

Do you find it impossible to talk to a person 10 feet away? Because their audio has a roughly 10ms latency.

Re: An update on Android's audio latency

#137
post #125

Earlier quoted context omitted.

What. Our brain is absolutely terrible at adjusting for latency. It can somewhat compensate, but only to an extent, and at severe cost. There’s this video around that puts people in a VR helmet playing A/V with a delay, even the lowest setting completely destroys any form of efficiency. Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency. Playing Super Mario Bros in…

> Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency. I think there is a subtle difference between fps (avg) and latency. I would say that a 'stable' latency is always better than a high fps. > Try Guitar Hero / Rock Band with various audio / video latency settings. 10ms is obviously impactful, anything higher borderlines on unplayable, and even 5ms has a subtle im…

> I think there is a subtle difference between fps (avg) and latency

Yup, I only mentioned 60Hz, because 16.667 ms is more obvious WRT latency but less known.

> Do you mean that you set an additional latency for both video and audio? Or you delay only the audio by 10ms?

No, RB allows you to set up the audio and video latencies, and since the track is fully known, it’s able to apply negative latency to everything but the input (which, being physical user input, is the only thing that can’t be altered).

So you set up input->audio latency and input->video latency values and the game will internally play them ahead, so that they appear exactly in sync in the physical world.

Re: An update on Android's audio latency

#138
post #135

Earlier quoted context omitted.

> That macs are more stable in day-to-day operation is not really a bold claim though. It absolutely is. Do you have any data to back up the claim? Anecdotally windows 10's stability seems vastly superior, especially with every release of MacOS seemingly regressing further and further.

I just ran ‘uptime’ on my Mac terminal. 194 days. I pretty much never reboot the thing. It’s just always stable, despite hundreds, maybe thousands, of sleep-wake cycles, usually a dozen apps open at one time, the thing is as stable now as it was when I rebooted it some six months ago. I used to use windows, for a decade, and certainly never had any experience like that.

The only time I ever reboot Windows 10 is to apply updates, which mac os also forces you to do. Windows doesn't even go down if a driver crashes anymore.

Updates alone put my old macbook pro at lower availability than any of my windows or Linux systems since MacOS manages to have a uniquely slow update system. I don't get how major MacOS updates manages to be several times slower than fresh installs of Windows or Linux.

Re: An update on Android's audio latency

#139

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?

Overhead that’s not linear with the buffer size. The cost (in CPU time, etc.) of updating a 480 sample buffer is similar to that of a 64 sample buffer.

Re: An update on Android's audio latency

#140
post #125

Earlier quoted context omitted.

What. Our brain is absolutely terrible at adjusting for latency. It can somewhat compensate, but only to an extent, and at severe cost. There’s this video around that puts people in a VR helmet playing A/V with a delay, even the lowest setting completely destroys any form of efficiency. Anything below 60Hz in VR has a significantly increased chance of giving motion sickness due to latency. Playing Super Mario Bros in…

Can confirm that many musicians have to play with latency. Pipe organs, heavily processed guitars (delay is an effect that is very commonly used) all are laggy and you have to play ahead of your accompaniment.

True for organists (for which I don’t know much about, but read on, as I believe the following applies to them as well)

The fact that the effects are laggy doesn’t mean you need to sync on them, you’re mostly listening whether the sound envelope is correct (e.g adjust for overshoot/undershoot a bend). Checking the output of effects only matters at timescales of whole beats/measures in terms of how you have to react, definitely not like keeping up with tempo, which has to be precise across the band.

You don’t get delay on drums, and exceedingly rarely so on bass, which is what you have to react agains efficiently, plus the instrument you’re playing provides its own subtle and not-so-subtle haptic feedback. On a guitar, this means the moment you pluck the chord is based on your internal clock synced by listening to the tempo giver (usually bass).

Source: amateur musician myself, wife is pro.

Post reply on HN