From 03d62dc7560a76253a973167e14a42c05c7ce132 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 8 May 2024 10:40:14 +0200 Subject: [PATCH] impl-port: input ports read from io cycle & 1 Input ports read from the async buffer cycle & 1 and output ports write to (cycle + 1) & 1 --- src/pipewire/impl-port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipewire/impl-port.c b/src/pipewire/impl-port.c index 961531343..a39716865 100644 --- a/src/pipewire/impl-port.c +++ b/src/pipewire/impl-port.c @@ -317,7 +317,7 @@ static int schedule_mix_input(void *object) struct pw_impl_port *this = &impl->this; struct spa_io_buffers *io = &this->rt.io; struct pw_impl_port_mix *mix; - uint32_t cycle = (this->node->rt.position->clock.cycle + 1) & 1; + uint32_t cycle = this->node->rt.position->clock.cycle & 1; if (SPA_UNLIKELY(PW_IMPL_PORT_IS_CONTROL(this))) return SPA_STATUS_HAVE_DATA | SPA_STATUS_NEED_DATA;