diff options
Diffstat (limited to 'src/server/internals')
-rw-r--r-- | src/server/internals/Controller.cpp | 5 | ||||
-rw-r--r-- | src/server/internals/Note.cpp | 8 | ||||
-rw-r--r-- | src/server/internals/Trigger.cpp | 5 |
3 files changed, 7 insertions, 11 deletions
diff --git a/src/server/internals/Controller.cpp b/src/server/internals/Controller.cpp index 607d4d1e..6abdaf64 100644 --- a/src/server/internals/Controller.cpp +++ b/src/server/internals/Controller.cpp @@ -95,9 +95,8 @@ ControllerNode::process(ProcessContext& context) Buffer* const midi_in = _midi_in_port->buffer(0).get(); LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)midi_in->atom(); - LV2_SEQUENCE_FOREACH(seq, i) { - LV2_Atom_Event* const ev = lv2_sequence_iter_get(i); - const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); + LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent && ev->body.size >= 3 && (buf[0] & 0xF0) == MIDI_CMD_CONTROL) { control(context, buf[1], buf[2], ev->time.frames + context.start()); diff --git a/src/server/internals/Note.cpp b/src/server/internals/Note.cpp index 0608972f..c770177f 100644 --- a/src/server/internals/Note.cpp +++ b/src/server/internals/Note.cpp @@ -138,11 +138,9 @@ NoteNode::process(ProcessContext& context) Buffer* const midi_in = _midi_in_port->buffer(0).get(); LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)midi_in->atom(); - LV2_SEQUENCE_FOREACH(seq, i) { - LV2_Atom_Event* const ev = lv2_sequence_iter_get(i); - const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); - const FrameTime time = context.start() + (FrameTime)ev->time.frames; - + LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); + const FrameTime time = context.start() + (FrameTime)ev->time.frames; if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent && ev->body.size >= 3) { switch (buf[0] & 0xF0) { diff --git a/src/server/internals/Trigger.cpp b/src/server/internals/Trigger.cpp index 09766f15..15921ae9 100644 --- a/src/server/internals/Trigger.cpp +++ b/src/server/internals/Trigger.cpp @@ -97,9 +97,8 @@ TriggerNode::process(ProcessContext& context) Buffer* const midi_in = _midi_in_port->buffer(0).get(); LV2_Atom_Sequence* seq = (LV2_Atom_Sequence*)midi_in->atom(); - LV2_SEQUENCE_FOREACH(seq, i) { - LV2_Atom_Event* const ev = lv2_sequence_iter_get(i); - const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); + LV2_ATOM_SEQUENCE_FOREACH(seq, ev) { + const uint8_t* buf = (const uint8_t*)LV2_ATOM_BODY(&ev->body); if (ev->body.type == _midi_in_port->bufs().uris().midi_MidiEvent && ev->body.size >= 3) { const FrameTime time = context.start() + ev->time.frames; |