mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
various places: Include resampler delay to latency reports and calculations
The resampler delay was not taken into account in all necessary places. This patch adds it where required. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/708>
This commit is contained in:
parent
3271020747
commit
2af10cf39b
9 changed files with 31 additions and 0 deletions
|
|
@ -771,6 +771,8 @@ static int sink_input_process_msg(pa_msgobject *obj, int code, void *data, int64
|
|||
/* Add content of memblockq's to sink latency */
|
||||
o->latency_snapshot.sink_latency = pa_sink_get_latency_within_thread(o->sink, true) +
|
||||
pa_bytes_to_usec(length, &o->sink->sample_spec);
|
||||
/* Add resampler latency */
|
||||
o->latency_snapshot.sink_latency += pa_resampler_get_delay_usec(o->sink_input->thread_info.resampler);
|
||||
|
||||
o->latency_snapshot.timestamp = pa_rtclock_now();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue