Only zero the remaining samples when the envelope is finished
This commit is contained in:
parent
4d87716a30
commit
f969761b5a
1 changed files with 1 additions and 0 deletions
|
|
@ -145,6 +145,7 @@ void FlexEnvelope::Impl::process(absl::Span<float> out)
|
||||||
while ((!stageSustained_ && currentTime_ >= stageTime_) ||
|
while ((!stageSustained_ && currentTime_ >= stageTime_) ||
|
||||||
(stageSustained_ && isReleased)) {
|
(stageSustained_ && isReleased)) {
|
||||||
if (!advanceToNextStage()) {
|
if (!advanceToNextStage()) {
|
||||||
|
out.remove_prefix(frameIndex);
|
||||||
fill(out, 0.0f);
|
fill(out, 0.0f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue