From 76175b9e802cd87e399ca049b34d69014ab361e2 Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Wed, 16 Sep 2020 17:52:33 +0100 Subject: [PATCH] It appears this may be all we need - apparently the occasional odd extra sample (due to incremental rounding) added up and eventually overran the filter. I believe +1 is perfectly good here, but we can afford to be more accommodating just in case --- src/dsp/Resampler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dsp/Resampler.cpp b/src/dsp/Resampler.cpp index d2db61f..248ede5 100644 --- a/src/dsp/Resampler.cpp +++ b/src/dsp/Resampler.cpp @@ -609,7 +609,7 @@ D_SRC::resample(const float *const R__ *const R__ in, { SRC_DATA data; - int outcount = lrintf(ceilf(incount * ratio)); + int outcount = lrintf(ceilf(incount * ratio) + 10); if (m_channels == 1) { data.data_in = const_cast(*in); //!!!???