[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] combine-sink: Fix latency reports
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Sat May 28 14:41:19 UTC 2022
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
d146a807 by Georg Chini at 2022-05-28T14:35:07+00:00
combine-sink: Fix latency reports
The combine sink used the current time and counter when calculating
the latency if smoother_2 was enabled. This lead to wrong latency
reports. This patch fixes the problem by using the snapshot time
and counter instead.
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/711>
- - - - -
1 changed file:
- src/modules/module-combine-sink.c
Changes:
=====================================
src/modules/module-combine-sink.c
=====================================
@@ -1072,7 +1072,7 @@ static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offse
size_t latency;
latency = pa_usec_to_bytes((pa_usec_t)offset, &u->sink->sample_spec);
- pa_smoother_2_put(u->thread_info.smoother, pa_rtclock_now(), (int64_t)u->thread_info.counter - latency);
+ pa_smoother_2_put(u->thread_info.smoother, u->thread_info.snapshot_time, (int64_t)u->thread_info.snapshot_counter - latency);
#else
pa_usec_t x, y, latency = (pa_usec_t) offset;
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/d146a8079b1fc69d71d42bb0e4a7288a48b5cd7a
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/d146a8079b1fc69d71d42bb0e4a7288a48b5cd7a
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20220528/490ae813/attachment.htm>
More information about the pulseaudio-commits
mailing list