mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -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
|
|
@ -265,6 +265,9 @@ static int sink_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t of
|
|||
pa_bytes_to_usec(pa_memblockq_get_length(u->sink_input->thread_info.render_memblockq), &u->sink_input->sink->sample_spec);
|
||||
// pa_bytes_to_usec(u->samples_gathered * fs, &u->sink->sample_spec);
|
||||
//+ pa_bytes_to_usec(u->latency * fs, ss)
|
||||
|
||||
/* 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