[pulseaudio-tickets] [Bug 81075] pa_simple_get_latency() reports latency inaccurately

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jun 17 18:04:53 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=81075

--- Comment #18 from Tanu Kaskinen <tanuk at iki.fi> ---
With the full API you can get the negative latencies in your application, yes,
but I'm not sure if that's any more "right", unless you're recording from
monitor sources that really can have negative latencies (negative latency means
"seeing in the future", and with monitor sources that's possible, because you
may sometimes get the audio to your application before the sound goes to the
speakers).

If you're not using a monitor source, a negative latency means that there's a
bug in PulseAudio. I think my patch is ok, even though changing negative
latencies to zero makes the latency calculations jumpy. The root cause seems to
be in pa_stream_get_latency(), more specifically in the smoother that estimates
how much audio has been played in total based on the current time and the past
timing information updates from the server. The smoother is consistently
estimating the played amount to be too low, and that makes the calculated
latency negative.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20170617/f4de535f/attachment.html>


More information about the pulseaudio-bugs mailing list