From 63ebc451076c8fdbae3c7a10b59df193f543a598 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Thu, 4 Aug 2022 13:34:31 +0100 Subject: [PATCH] ... I said, in RatioOftenChanging mode --- src/common/BQResampler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/BQResampler.cpp b/src/common/BQResampler.cpp index 30d3d38..384e159 100644 --- a/src/common/BQResampler.cpp +++ b/src/common/BQResampler.cpp @@ -378,7 +378,12 @@ BQResampler::pick_params(double ratio) const { // Farey algorithm, see // https://www.johndcook.com/blog/2010/10/20/best-rational-approximation/ - int max_denom = m_qparams.rational_max; + int max_denom; + if (m_dynamism == RatioMostlyFixed) { + max_denom = 192000; + } else { + max_denom = m_qparams.rational_max; + } double a = 0.0, b = 1.0, c = 1.0, d = 0.0; double pa = a, pb = b, pc = c, pd = d; double eps = 1e-9;