Browse Source

Fix infinite loop when receiving midi message over 4 bytes in size

Signed-off-by: falkTX <falktx@falktx.com>
pull/18/head
falkTX 2 years ago
parent
commit
0e999f34e1
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      plugins/Nekobi/DistrhoPluginNekobi.cpp

+ 1
- 2
plugins/Nekobi/DistrhoPluginNekobi.cpp View File

@@ -373,13 +373,12 @@ void DistrhoPluginNekobi::run(const float**, float** outputs, uint32_t frames, c
fSynth.nugget_remains = XSYNTH_NUGGET_SIZE;
/* process any ready events */
while (curEventIndex < midiEventCount && framesDone == midiEvents[curEventIndex].frame)
for (; curEventIndex < midiEventCount && framesDone == midiEvents[curEventIndex].frame; ++curEventIndex)
{
if (midiEvents[curEventIndex].size > MidiEvent::kDataSize)
continue;
nekobee_handle_raw_event(&fSynth, midiEvents[curEventIndex].size, midiEvents[curEventIndex].data);
curEventIndex++;
}
/* calculate the sample count (burstSize) for the next nekobee_voice_render() call to be the smallest of:


Loading…
Cancel
Save