pulse-tunnel: fix rate adjustement argument

The sign of the error was wrong, making the rate controller adjust in
the wrong direction and make things worse.

See #2548
This commit is contained in:
Wim Taymans 2022-08-30 16:01:14 +02:00
parent 24f6225c5d
commit 9248ce3c19

View file

@ -278,7 +278,7 @@ static void playback_stream_process(void *d)
} else {
float error, corr;
error = (float)(impl->current_latency) - (float)impl->target_latency;
error = (float)impl->target_latency - (float)impl->current_latency;
error = SPA_CLAMP(error, -impl->max_error, impl->max_error);
corr = spa_dll_update(&impl->dll, error);