If an event is registered at some delay, shadow the previous value
This commit is contained in:
parent
9263488882
commit
612265ebb5
1 changed files with 4 additions and 1 deletions
|
|
@ -105,7 +105,10 @@ void sfz::MidiState::ccEvent(int delay, int ccNumber, float ccValue) noexcept
|
|||
{
|
||||
ASSERT(ccValue >= 0.0 && ccValue <= 1.0);
|
||||
const auto insertionPoint = absl::c_upper_bound(cc[ccNumber], delay, MidiEventDelayComparator{});
|
||||
cc[ccNumber].insert(insertionPoint, { delay, ccValue });
|
||||
if (insertionPoint == cc[ccNumber].end() || insertionPoint->delay != delay)
|
||||
cc[ccNumber].insert(insertionPoint, { delay, ccValue });
|
||||
else
|
||||
insertionPoint->value = ccValue;
|
||||
}
|
||||
|
||||
float sfz::MidiState::getCCValue(int ccNumber) const noexcept
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue