Live data from Hacker News

Android’s 10 Millisecond Problem explained

superpowered.com

251–260 of 311 posts

Re: Android’s 10 Millisecond Problem explained

#251
post #249
post #228

Earlier quoted context omitted.

"A little manly-man programming from the wrist and we move on to real problems." See... it's the little things like this. I am pretty sure that was not your intention, but please do know that turns of phrases like that hurt a little, and exclude a little. To see what I mean, s/man/jew/ or s/man/white/ or some other category and see how it reads.

Well, if I wanted to offend, I would have. It is frankly no challenge to deliberately say something un-PC and widely offensive. It is also apparently little more challenging to utter something more subtle and more narrowly offensive. I look at "manly man" depictions of, well, manly men (for instance, watch Kevin Kline's performance in A Fish Called Wanda ) as parody. Monty Python did it. Mark Twain probably did it. D…

BOOM

Re: Android’s 10 Millisecond Problem explained

#252
post #216

Hi everyone -- Gabor and I wrote the piece -- let us know if you have any questions we can help answer for you.

What are the concrete steps you are taking to tackle the issue? Idea: A latency ranking for devices would put pressure on manufactures. Will you work together with the Linux community so we all benefit from it?

Hi there -- latency ranking you ask?

As Westley from The Princess Bride might reply, "As you wish"

http://superpowered.com/latency :)

Re: Android’s 10 Millisecond Problem explained

#254
post #242

Earlier quoted context omitted.

This comment is terrifying. You cannot say anything without being called out with this sort of terrible attitude.

Of course you can. Language is intensely rich, there's such a tiny subset of stuff that we're now starting to recognize rubs people the wrong way/excludes people/makes us sound like cavemen. I don't at all get what benefit there is to being able to say "manly-man programming," either from a communication or a social standpoint. I don't get what's lost when we replace "manly-man programming" with anything less stupid…

s/cavemen/cavepeople/

Re: Android’s 10 Millisecond Problem explained

#255
post #215
post #177

Earlier quoted context omitted.

> Since the one coming from the hardware is completely fictitious Why do you say this? The USB audio card (or similar) is generating blocks of audio at a fixed rate, no? Maybe for video playback or games you need to synchronize audio and video, but there is no need to do that for music production apps. If you are writing some sort of synth, as soon as you receive a midi note or a tap, trigger the synth and the note w…

Well, it depends on how that specific hardware is designed, but we could say that hardware that is designed to generate only fixed blocks of audio is very poor from a latency perspective. I think you will find, though, that most hardware isn't this way, and to the extent this problem exists, it is usually an API or driver model problem. If you're talking about a sound card for a PC, probably it is filling a ring buff…

Can you recommend some good code / APIs to check out that don't do it block based? I usually use JUCE which is block based, and I assumed it was just a thin wrapper around the OS APIs which we also block based.

Re: Android’s 10 Millisecond Problem explained

#256

This is a great description of the lowest level problem. But for those wondering why iOS doesn't have the problem or why only 10ms is such a difference, the answer is that this is only the beginning of the problem of Android audio latency. There are still additional problems that add latency that span the entire Android stack from the actual hardware and drivers, to the kernel and scheduler, to the Android implementa…

Whole Androids latency has been terrible since its inception, screen/input/audio.

Android is famous for $600 2GHz phones that drop frames when doing simple animations :(.

Re: Android’s 10 Millisecond Problem explained

#257
post #104

There is something I don't understand; maybe someone here can explain: Sound travels at about 340 m/s (in a typical room). That means it travels about 3.4 metres in 10 milliseconds. Therefore another way to get a 10 millisecond problem is to stand 3.4 metres from the orchestra. Most people sit farther than 3.4 metres from the orchestra, yet they don't complain about a lag between when the violin bow moves and the sou…

80ms/30 meters rule. Human brain is compensating for the audio/video discrepancy up to ~that number.

http://blogs.scientificamerican.com/observations/2011/09/15/...

tldr: Brain is inherently parallel, nothing happens in sync. In order to make sense of the outside world higher level functions are presented with artificially coordinated stimuli.

Re: Android’s 10 Millisecond Problem explained

#259
post #249
post #228

Earlier quoted context omitted.

"A little manly-man programming from the wrist and we move on to real problems." See... it's the little things like this. I am pretty sure that was not your intention, but please do know that turns of phrases like that hurt a little, and exclude a little. To see what I mean, s/man/jew/ or s/man/white/ or some other category and see how it reads.

Well, if I wanted to offend, I would have. It is frankly no challenge to deliberately say something un-PC and widely offensive. It is also apparently little more challenging to utter something more subtle and more narrowly offensive. I look at "manly man" depictions of, well, manly men (for instance, watch Kevin Kline's performance in A Fish Called Wanda ) as parody. Monty Python did it. Mark Twain probably did it. D…

I enjoyed the insights in your first comment and looked forward to reading this thread for obscure tidbits on audio latency on Android. However, instead of getting replies on your experience, we get a huge meta thread that contributes nothing to the original topic.

Sadly, some users have to disrupt a thread, no matter how inane or off-topic it might be :(. Sometimes it gets to the point I don't even want to read or contribute to the discussions on HN anymore and add the site to my hosts list so I won't be tempted to read it out of habit. Eventually I come back, but the times in between get longer.

After skimming the comment history of the person you're replying to, I'd just ignore them, because they have a history of doing this. If HN had an ignore list, they would surely be on mine. Won't be the first or last time they disrupt (troll) a thread.

Re: Android’s 10 Millisecond Problem explained

#260

Earlier quoted context omitted.

Music or video production studios typically have a central clock, so for this use-case the sample rates should be perfect. But even if the input and output devices are on perfect clocks, with NTSC (59.94 Hz), you'd need a very odd number of samples per video frame in your software, if your processing would happen at a integer fraction of the video frame rate.

Do you know whether studios use 48000Hz with 59.94fps or 48000/1.001 ≈ 47952Hz? Does converting from 24fps film to 23.976fps Blu-ray require resampling the audio? Or are films recoded at 48048Hz and then slowed to 48000 for consumer release?

The short answer is that it's complicated. Digital film (DCP) is typically 24 fps, asirc -- and that doesn't go well into 60, or 50. And the difference is enough that you need to drop a frame and/or stretch the audio. And sometimes this doesn't go so well.

There's a relatively recent trend to try and record digital all the way, and this is also complicated. Record at 24 fps? At 30? At 60? 60 fps 4k is a lot of data. And sound is actually the major pain point -- video frames you can generally just drop/double, speed up/down a little to even things out. But 24 fps to 60 fps creates big enough gaps that audio pitch can become an issue.

Post reply on HN