From 5efc3176037eb782db54b15984650cf5b526d6f3 Mon Sep 17 00:00:00 2001 From: KarateBrot Date: Sun, 12 Dec 2021 05:36:43 +0100 Subject: [PATCH] Fix SDFT batchSize --- src/main/common/sdft.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/common/sdft.c b/src/main/common/sdft.c index 2e61634f1c..77cf6be47f 100644 --- a/src/main/common/sdft.c +++ b/src/main/common/sdft.c @@ -52,7 +52,7 @@ void sdftInit(sdft_t *sdft, const int startBin, const int endBin, const int numB sdft->startBin = startBin; sdft->endBin = endBin; sdft->numBatches = numBatches; - sdft->batchSize = (sdft->endBin - sdft->startBin + 1) / sdft->numBatches + 1; + sdft->batchSize = (sdft->endBin - sdft->startBin) / sdft->numBatches + 1; // batchSize = ceil(numBins / numBatches) for (int i = 0; i < SDFT_SAMPLE_SIZE; i++) { sdft->samples[i] = 0.0f;