Live data from Hacker News

Android’s 10 Millisecond Problem explained

superpowered.com

71–80 of 311 posts

Re: Android’s 10 Millisecond Problem explained

#71

Earlier quoted context omitted.

> This is not a good analogy. I'd say it's a bad analogy because most people who don't live in the US have no idea what Ruth's Chris is.

Nor do most people who do live in the US, I would imagine... I infer that it's a high-end steak joint, but I've never heard of it.

I haven't heard that name since leaving the Midwest.

Re: Android’s 10 Millisecond Problem explained

#72

Earlier quoted context omitted.

Audio processing on Android devices is Slow. Even seemingly small delays (10 milliseconds) is enough to make apps seem clunky and erratic. This puts the Android platform at a disadvantage for developers whose product ideas involve delivering high quality audio performance. The embedded graph with the U shaped figure pretty much sums up the author's search for the components in the software that are the culprits.

> Even seemingly small delays (10 milliseconds) is enough to make apps seem clunky and erratic Not just that, if you try to play guitar with a 10ms latency from input to output, you'll find that it's impossible to keep rhythm at all. It's the same effect as a speech jammer: http://www.stutterbox.co.uk/ And I don't think many people outside the the tech audio community realize how many people have ditched their guitar…

> And I don't think many people outside the the tech audio community realize how many people have ditched their guitar amplifiers and are playing guitar purely through the iOS devices.

I'm super interested in this question because I honestly don't know. My assumption is that among serious guitar players (defined as individuals who play in groups or in front of people at least monthly) the number is almost nil.

I'm sure the number of casual guitarists (those who rarely play, but technically own one), this number is quite high.

I'm unwilling to even concede the tubes in my amp let alone the amp itself...

Re: Android’s 10 Millisecond Problem explained

#74
post #54

Earlier quoted context omitted.

Actually you have it inverted. Fewer layers means fewer abstractions. Less abstraction means you're lower level, thereby having increased flexibility. Edit: Anyone care to elaborate why the downvotes? From a technical standpoint, I'm absolutely right.

Then assembly is more flexible than your favorite high-level language? It's true that you can, by definition, do more with low-level access. And I suppose that's one definition of "flexibility". But I think most developers would use the word to mean that various pieces of functionality can be put together easily. So they might say, for example, that Unix pipes are "flexible". I think I'd usually agree with that meani…

Yes, assembly is more flexible than my favorite higher level language.

Because if you have access to assembly, you can implement the whatever higher level language or semantics you want.

Whereas if you only have a higher level language, you have to work with/around the abstractions baked into it.

For realtime applications it's better to at least have access to a low-level, less overhead API.

Re: Android’s 10 Millisecond Problem explained

#75

Isn't this kind of a known issue in Linux land? As much as it has improved, latency has always been the bane of audio applications in the Linux kernel. I remember in the days of kernel 2.2 that even XMMS would stop playing any music if I started using more than one or two applications. Recently I got one of those cheap USB interfaces to connect my guitar. I spent some good 4 hours changing the kernel to "low latency"…

It was and I'm guessing still is a problem on Windows too:

http://en.wikipedia.org/wiki/Latency_(audio)

Linux has a Real Timer kernel you can run, I used to run it when doing audio stuff, it works great.

Re: Android’s 10 Millisecond Problem explained

#76

Isn't this kind of a known issue in Linux land? As much as it has improved, latency has always been the bane of audio applications in the Linux kernel. I remember in the days of kernel 2.2 that even XMMS would stop playing any music if I started using more than one or two applications. Recently I got one of those cheap USB interfaces to connect my guitar. I spent some good 4 hours changing the kernel to "low latency"…

>I remember in the days of kernel 2.2 that even XMMS would stop playing any music if I started using more than one or two applications.

Back then the sound subsystem didn't do any mixing or similar, so if some program grabbed /dev/snd, everyone else had to wait.

As for low latency sound work on Linux today, Jack is what you want rather than pulseaudio. Frankly Pulseaudio is a massive detour when it comes to Linux audio.

Re: Android’s 10 Millisecond Problem explained

#77
post #49

TL;DR the Linux layer (ALSA) and the Java layer (Audio Flinger) use widely compatible but high latency techniques, whereas Apple designed their API's and hardware such that these layers can be optimized to almost nothing. (From the article: http://superpowered.com/wp-content/uploads/2015/04/Android-A... )

I don't know about Android but you can get quite good audio latency with a full Linux install, using ALSA(via JACK), provided your audio interface is up to the task.

Re: Android’s 10 Millisecond Problem explained

#78
post #54

Earlier quoted context omitted.

Actually you have it inverted. Fewer layers means fewer abstractions. Less abstraction means you're lower level, thereby having increased flexibility. Edit: Anyone care to elaborate why the downvotes? From a technical standpoint, I'm absolutely right.

Then assembly is more flexible than your favorite high-level language? It's true that you can, by definition, do more with low-level access. And I suppose that's one definition of "flexibility". But I think most developers would use the word to mean that various pieces of functionality can be put together easily. So they might say, for example, that Unix pipes are "flexible". I think I'd usually agree with that meani…

[deleted]

Re: Android’s 10 Millisecond Problem explained

#80

Is 10ms really that big of a deal? I'm an amateur musician so have some experience playing in bands, but I have a hard time believing 10ms would feel off when playing with others.

9ms is the industry-recognised time that it takes before the brain notices that sync is out. If you have 2 woodblocks clapping and they are more than 9ms out of sync, you will hear one as an echo instead of 2 blocks at the same time. So if you are a band wanting to play remotely and you have 100ms network latency plus all the other latencies of the software layer, it's not going to be possible. Similarly if you are trying to drum in time with a track: more than 10ms latency from when you tap your finger to when you hear the audio, you'll have a hard time staying in sync.
Post reply on HN