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_) ||
|
||||
(stageSustained_ && isReleased)) {
|
||||
if (!advanceToNextStage()) {
|
||||
out.remove_prefix(frameIndex);
|
||||
fill(out, 0.0f);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue