mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04: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>
This commit is contained in:
parent
2af10cf39b
commit
d146a8079b
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue