... I said, in RatioOftenChanging mode

This commit is contained in:
Chris Cannam
2022-08-04 13:34:31 +01:00
parent 76ee5998f1
commit 63ebc45107

View File

@@ -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;