Let the sustain be slightly above zero so that decay checks converge
This commit is contained in:
parent
4248b136e7
commit
ae7f84204c
1 changed files with 2 additions and 1 deletions
|
|
@ -34,7 +34,8 @@ void ADSREnvelope<Type>::reset(const EGDescription& desc, const Region& region,
|
|||
this->releaseRate = secondsToExpRate(desc.getRelease(state, velocity));
|
||||
this->hold = secondsToSamples(desc.getHold(state, velocity));
|
||||
this->peak = 1.0;
|
||||
this->sustain = normalizePercents(desc.getSustain(state, velocity));
|
||||
this->sustain = normalizePercents(desc.getSustain(state, velocity));
|
||||
this->sustain = max(this->sustain, config::virtuallyZero);
|
||||
this->start = this->peak * normalizePercents(desc.getStart(state, velocity));
|
||||
|
||||
releaseDelay = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue