From 3db535281b0ea4a063e9dff124c366ed6854b843 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Wed, 15 Jun 2022 10:00:49 +0100 Subject: [PATCH] This must round down; otherwise we can end up with the outhop exceeding 256 for some hops when we haven't planned it --- 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 cb972ff..5f9ffeb 100644 --- a/src/finer/R3StretcherImpl.cpp +++ b/src/finer/R3StretcherImpl.cpp @@ -276,7 +276,7 @@ R3StretcherImpl::calculateHop() inhop = 768.0; } - m_inhop = int(round(inhop)); + m_inhop = int(floor(inhop)); std::cout << "R3StretcherImpl::calculateHop: inhop = " << m_inhop << ", proposed outhop = " << proposedOuthop << ", mean outhop = " << m_inhop * ratio << std::endl; }