mozilla / cubeb-coreaudio-rs

The audio backend of Firefox on Mac OS X.
ISC License
25 stars 10 forks source link

Fix clock reporting by using the correct latency number #101

Closed padenot closed 4 years ago

padenot commented 4 years ago

It's wrong, but it matters more in some scenarii than others:

Testing on my mbp 2018 with the built-in output device the device + stream latency is 17 frames, and the total latency (taking into account the timestamp provided in the callback) is 544. This was at 48kHz and this translates to 300us and 11.3ms respectively. Quite a big difference, but not really noticeable for A/V sync when not looking for it, I assume.

For a bluetooth device (Sony WH1000-XM3) on the same machine, it's 7872 frames of latency for the device, and 9148 total, still at 48kHz, this translates to respectively 164ms and 190ms, which is quite a lot (a bit less than two frames at 60fps, a bit less than a frame at 30fps).

Not the end of the world, but still better. This mailing list post has background on this.

ChunMinChang commented 4 years ago

Add some references