From 0ec41e60efa87737abd8316555a135b57e3b0807 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 15 Jun 2022 15:39:04 +0200 Subject: [PATCH] audioconvert2: fix for quantum changes Use the offset as the buffer size. Use the amount of requested - amount of used samples as queued samples. --- spa/plugins/audioconvert/audioconvert2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spa/plugins/audioconvert/audioconvert2.c b/spa/plugins/audioconvert/audioconvert2.c index a557aaa94..563693ab2 100644 --- a/spa/plugins/audioconvert/audioconvert2.c +++ b/spa/plugins/audioconvert/audioconvert2.c @@ -2452,8 +2452,8 @@ static int impl_node_process(void *object) for (j = 0; j < port->blocks; j++) { bd = &buf->buf->datas[j]; - bd->chunk->size = n_samples * port->stride; - spa_log_trace_fp(this->log, "out: %d %d %d", n_samples, + bd->chunk->size = this->out_offset * port->stride; + spa_log_trace_fp(this->log, "out: %d %d %d", this->out_offset, port->stride, bd->chunk->size); } io->status = SPA_STATUS_HAVE_DATA; @@ -2478,7 +2478,7 @@ static int impl_node_process(void *object) } } resample_update_rate_match(this, resample_passthrough, - n_out - this->out_offset, + max_out - this->out_offset, max_in - this->in_offset); return res;