pulse-server: add the delay

Actually add the delay to the buffered amount of time instead of
overwriting.
This commit is contained in:
Wim Taymans 2022-07-13 10:49:26 +02:00
parent 855d17ac1b
commit 35082e4f4b

View file

@ -1277,7 +1277,7 @@ do_process_done(struct spa_loop *loop,
stream->timestamp = pd->pwt.now;
stream->delay = pd->pwt.buffered * SPA_USEC_PER_SEC / stream->ss.rate;
if (pd->pwt.rate.denom > 0)
stream->delay = pd->pwt.delay * SPA_USEC_PER_SEC / pd->pwt.rate.denom;
stream->delay += pd->pwt.delay * SPA_USEC_PER_SEC * pd->pwt.rate.num / pd->pwt.rate.denom;
if (stream->direction == PW_DIRECTION_OUTPUT) {
if (pd->quantum != stream->last_quantum)