From 35082e4f4b12443983fdeff87bcce971d39dd4eb Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 13 Jul 2022 10:49:26 +0200 Subject: [PATCH] pulse-server: add the delay Actually add the delay to the buffered amount of time instead of overwriting. --- src/modules/module-protocol-pulse/pulse-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-protocol-pulse/pulse-server.c b/src/modules/module-protocol-pulse/pulse-server.c index ac645c658..e8dc1960d 100644 --- a/src/modules/module-protocol-pulse/pulse-server.c +++ b/src/modules/module-protocol-pulse/pulse-server.c @@ -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)