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
|
|
@ -105,6 +105,9 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of
|
|||
/* Add the latency internal to our sink input on top */
|
||||
pa_bytes_to_usec(pa_memblockq_get_length(u->sink_input->thread_info.render_memblockq), &u->sink_input->sink->sample_spec);
|
||||
|
||||
/* Add resampler latency */
|
||||
*((int64_t*) data) += pa_resampler_get_delay_usec(u->sink_input->thread_info.resampler);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue