From 88727afbd22953c9f31f663a7511cabf81e10fdc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 18 Jan 2021 15:07:57 +0100 Subject: [PATCH] resample: take already queued sample into account When asking for samples, take into account the amount of samples we already have converted. --- spa/plugins/audioconvert/resample.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/audioconvert/resample.c b/spa/plugins/audioconvert/resample.c index f6dd148b1..35398baa1 100644 --- a/spa/plugins/audioconvert/resample.c +++ b/spa/plugins/audioconvert/resample.c @@ -882,7 +882,7 @@ static int impl_node_process(void *object) else resample_update_rate(&this->resample, 1.0); this->io_rate_match->delay = resample_delay(&this->resample); - this->io_rate_match->size = resample_in_len(&this->resample, max); + this->io_rate_match->size = resample_in_len(&this->resample, max - outport->offset / sizeof(float)); } return res; }