Skip to content

Commit

Permalink
This padding is needed to not lose samples in the first frame of a re…
Browse files Browse the repository at this point in the history
…sample. 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.
  • Loading branch information
jonoomph committed Sep 14, 2020
1 parent 3f3bcc1 commit 6537278
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FrameMapper.cpp
Expand Up @@ -487,7 +487,7 @@ std::shared_ptr<Frame> 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;
Expand Down

0 comments on commit 6537278

Please sign in to comment.