Skip to content

Commit 6537278

Browse files
committed
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.
1 parent 3f3bcc1 commit 6537278

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/FrameMapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,7 @@ std::shared_ptr<Frame> FrameMapper::GetFrame(int64_t requested_frame)
487487
// includes some additional input samples on first iteration,
488488
// and continues the offset to ensure that the sample rate
489489
// converter isn't input limited.
490-
const int EXTRA_INPUT_SAMPLES = 20;
490+
const int EXTRA_INPUT_SAMPLES = 100;
491491

492492
// Extend end sample count by an additional EXTRA_INPUT_SAMPLES samples
493493
copy_samples.sample_end += EXTRA_INPUT_SAMPLES;

0 commit comments

Comments
 (0)