From 6537278c1c1acead097aa3ea8f51f9ae7c0c4573 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 14 Sep 2020 03:13:54 -0500 Subject: [PATCH] This padding is needed to not lose samples in the first frame of a resample. Apparently, we need enough padding, so we exceed the # of samples required for the first frame, and 20 was just too low for many frame rates / sample rates. --- src/FrameMapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp index e1e5700c2..4c561f8fe 100644 --- a/src/FrameMapper.cpp +++ b/src/FrameMapper.cpp @@ -487,7 +487,7 @@ std::shared_ptr FrameMapper::GetFrame(int64_t requested_frame) // includes some additional input samples on first iteration, // and continues the offset to ensure that the sample rate // converter isn't input limited. - const int EXTRA_INPUT_SAMPLES = 20; + const int EXTRA_INPUT_SAMPLES = 100; // Extend end sample count by an additional EXTRA_INPUT_SAMPLES samples copy_samples.sample_end += EXTRA_INPUT_SAMPLES;