Merge pull request #732 from paulfd/padding-frames
If the voice just started, output from the first source sample
This commit is contained in:
commit
77a83561cf
1 changed files with 5 additions and 0 deletions
|
|
@ -927,6 +927,11 @@ void Voice::Impl::fillWithData(AudioSpan<float> buffer) noexcept
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fill(*jumps, pitchRatio_ * speedRatio_);
|
fill(*jumps, pitchRatio_ * speedRatio_);
|
||||||
|
|
||||||
|
// Take the first sample if the voice just started
|
||||||
|
if (age_ == 0)
|
||||||
|
jumps->front() = 0.0f;
|
||||||
|
|
||||||
pitchEnvelope(*jumps);
|
pitchEnvelope(*jumps);
|
||||||
|
|
||||||
jumps->front() += floatPositionOffset_;
|
jumps->front() += floatPositionOffset_;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue