Skip to content

Commit

Permalink
Duplicate Midi Event Timestamp bug (#5833)
Browse files Browse the repository at this point in the history
If two midi events arrived with the exact sample sample
timestep, they would push to the end of the block along
with the rest of the midi in that block. Fix it with
an if/while switch on processing the midi list.

Addresses #5830
  • Loading branch information
baconpaul authored Jan 27, 2022
1 parent edbf08a commit 6e7f2e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/surge-xt/SurgeSynthProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ void SurgeSynthProcessor::processBlock(juce::AudioBuffer<float> &buffer,

for (int i = 0; i < buffer.getNumSamples(); i++)
{
if (i == nextMidi)
while (i == nextMidi)
{
applyMidi(*midiIt);
midiIt++;
Expand Down

0 comments on commit 6e7f2e0

Please sign in to comment.