Merge pull request #811 from paulfd/taiko-bugs

Taiko bugs
This commit is contained in:
JP Cimalando 2021-04-10 16:00:36 +02:00 committed by GitHub
commit 4481bc33b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -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:

View file

@ -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;