Remove some branches from the envelope

This commit is contained in:
Paul Fd 2021-05-23 16:37:23 +02:00
parent 8e13b232a3
commit 6b0c79b162

View file

@ -123,7 +123,7 @@ void ADSREnvelope::getBlock(absl::Span<Float> output) noexcept
} }
while (count < size) { while (count < size) {
if (currentValue > sustain) if (currentValue > sustain)
currentValue = std::max(sustain, currentValue + transitionDelta); currentValue += transitionDelta;
output[count++] = currentValue; output[count++] = currentValue;
} }
break; break;