commit
4481bc33b0
2 changed files with 3 additions and 4 deletions
|
|
@ -133,7 +133,8 @@ void ADSREnvelope::getBlock(absl::Span<Float> output) noexcept
|
|||
if (currentValue <= config::egReleaseThreshold) {
|
||||
currentState = State::Fadeout;
|
||||
currentValue = previousValue;
|
||||
transitionDelta = -currentValue / (sampleRate * config::egTransitionTime);
|
||||
transitionDelta = -max(config::egReleaseThreshold, currentValue)
|
||||
/ (sampleRate * config::egTransitionTime);
|
||||
}
|
||||
break;
|
||||
case State::Fadeout:
|
||||
|
|
|
|||
|
|
@ -1154,9 +1154,7 @@ void Voice::Impl::fillWithData(AudioSpan<float> buffer) noexcept
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!released())
|
||||
off(int(i), true);
|
||||
|
||||
off(int(i), true);
|
||||
fill<int>(indices->subspan(i), sampleEnd);
|
||||
fill<float>(coeffs->subspan(i), 0x1.fffffep-1);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue