mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-04 20:55:48 +01:00
VST2: store VstMidiEvents with the correct size
...otherwise MidiBuffer::push_back() will drop them. (E.g. MIDI_CMD_CHANNEL_PRESSURE events are just 2 bytes, not 3.)
This commit is contained in:
parent
5360ba0000
commit
e1ef129ab0
1 changed files with 8 additions and 1 deletions
|
|
@ -27,6 +27,8 @@
|
|||
#endif
|
||||
#include <cstdio>
|
||||
|
||||
#include "evoral/midi_util.h"
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/debug.h"
|
||||
#include "ardour/session.h"
|
||||
|
|
@ -301,7 +303,12 @@ intptr_t Session::vst_callback (
|
|||
for (int n = 0 ; n < v->numEvents; ++n) {
|
||||
VstMidiEvent *vme = (VstMidiEvent*) (v->events[n]->dump);
|
||||
if (vme->type == kVstMidiType) {
|
||||
plug->midi_buffer()->push_back(vme->deltaSamples, Evoral::MIDI_EVENT, 3, (uint8_t*)vme->midiData);
|
||||
plug->midi_buffer()->push_back(
|
||||
vme->deltaSamples,
|
||||
Evoral::MIDI_EVENT,
|
||||
Evoral::midi_event_size((uint8_t)vme->midiData[0]),
|
||||
(uint8_t*)vme->midiData
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue