From d34b33da2884cfa85f7055ea204f1f6d04ed948f Mon Sep 17 00:00:00 2001 From: Geraint Luff Date: Wed, 5 Feb 2025 23:15:12 +0000 Subject: [PATCH] Fix time-stretching bug (never recomputed previous block) --- signalsmith-stretch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/signalsmith-stretch.h b/signalsmith-stretch.h index 5d5a8ba..8ce65b5 100644 --- a/signalsmith-stretch.h +++ b/signalsmith-stretch.h @@ -192,7 +192,7 @@ struct SignalsmithStretch { bool newSpectrum = didSeek || (inputInterval > 0); if (newSpectrum) { - if (didSeek || inputInterval != int(stft.samplesSinceAnalysis())) { // make sure the previous input is the correct distance in the past + if (didSeek || inputInterval != int(stft.defaultInterval())) { // make sure the previous input is the correct distance in the past stft.analyse(stft.defaultInterval()); // Copy previous analysis to our band objects for (int c = 0; c < channels; ++c) {