diff --git a/src/sfizz/EventEnvelopes.cpp b/src/sfizz/EventEnvelopes.cpp index a0e5babf..20d56201 100644 --- a/src/sfizz/EventEnvelopes.cpp +++ b/src/sfizz/EventEnvelopes.cpp @@ -66,9 +66,6 @@ template void EventEnvelope::prepareEvents() { if (resetEvents) { - if (!events.empty()) - currentValue = events.back().second; - clear(); } else { absl::c_sort(events, [](const auto& lhs, const auto& rhs) { @@ -152,7 +149,7 @@ void LinearEnvelope::getQuantizedBlock(absl::Span output, Type quant fill(output.subspan(index), currentValue); currentValue = newValue; index = outputSize; - break; + continue; } const auto length = event.first - index - 1; @@ -241,7 +238,7 @@ void MultiplicativeEnvelope::getQuantizedBlock(absl::Span output, Ty fill(output.subspan(index), currentValue); currentValue = newValue; index = outputSize; - break; + continue; } const auto length = event.first - index - 1;