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) {
|
if (currentValue <= config::egReleaseThreshold) {
|
||||||
currentState = State::Fadeout;
|
currentState = State::Fadeout;
|
||||||
currentValue = previousValue;
|
currentValue = previousValue;
|
||||||
transitionDelta = -currentValue / (sampleRate * config::egTransitionTime);
|
transitionDelta = -max(config::egReleaseThreshold, currentValue)
|
||||||
|
/ (sampleRate * config::egTransitionTime);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case State::Fadeout:
|
case State::Fadeout:
|
||||||
|
|
|
||||||
|
|
@ -1154,9 +1154,7 @@ void Voice::Impl::fillWithData(AudioSpan<float> buffer) noexcept
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!released())
|
off(int(i), true);
|
||||||
off(int(i), true);
|
|
||||||
|
|
||||||
fill<int>(indices->subspan(i), sampleEnd);
|
fill<int>(indices->subspan(i), sampleEnd);
|
||||||
fill<float>(coeffs->subspan(i), 0x1.fffffep-1);
|
fill<float>(coeffs->subspan(i), 0x1.fffffep-1);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue