mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-24 06:59:57 -05:00
virtual sources: Include resampler delay in latency reports
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/120>
This commit is contained in:
parent
d55fde2fed
commit
129a59a2f0
3 changed files with 9 additions and 0 deletions
|
|
@ -422,6 +422,9 @@ static int source_process_msg_cb(pa_msgobject *o, int code, void *data, int64_t
|
|||
/* and the buffering we do on the source */
|
||||
pa_bytes_to_usec(u->source_output_blocksize, &u->source_output->source->sample_spec);
|
||||
|
||||
/* Add resampler delay */
|
||||
*((int64_t*) data) += pa_resampler_get_delay_usec(u->source_output->thread_info.resampler);
|
||||
|
||||
return 0;
|
||||
|
||||
case PA_SOURCE_MESSAGE_SET_VOLUME_SYNCED:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue