From ef2d39b3af1f55094ddf0e3411d2ee3530d7cfb6 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Mon, 6 Jun 2022 17:50:22 +0100 Subject: [PATCH] Or is this the right thing? I'm having trouble deciding --- src/finer/R3StretcherImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finer/R3StretcherImpl.cpp b/src/finer/R3StretcherImpl.cpp index bc68736..9783b43 100644 --- a/src/finer/R3StretcherImpl.cpp +++ b/src/finer/R3StretcherImpl.cpp @@ -767,7 +767,7 @@ R3StretcherImpl::synthesiseChannel(int c, int outhop) int lowBin = int(floor(fftSize * band.f0 / m_parameters.sampleRate)); int highBin = int(floor(fftSize * band.f1 / m_parameters.sampleRate)); - if (highBin % 2 == 1) --highBin; + if (highBin % 2 == 0 && highBin > 0) --highBin; for (int i = 0; i < lowBin; ++i) { scale->mag[i] = 0.0;