null-source: Change max_rewind when the latency changes

The null-source did not change max_rewind when changing the latency. This
patch fixes the issue.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/493>
This commit is contained in:
Georg Chini 2021-01-31 20:13:16 +01:00 committed by PulseAudio Marge Bot
parent 12cf6da242
commit 89bae1b3b7

View file

@ -128,6 +128,8 @@ static void source_update_requested_latency_cb(pa_source *s) {
if (u->block_usec == (pa_usec_t)-1)
u->block_usec = u->source->thread_info.max_latency;
pa_source_set_max_rewind_within_thread(s, pa_usec_to_bytes(u->block_usec, &u->source->sample_spec));
}
static void thread_func(void *userdata) {