summaryrefslogtreecommitdiffstats
path: root/src/server/internals
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-12 02:40:42 +0000
committerDavid Robillard <d@drobilla.net>2012-04-12 02:40:42 +0000
commitb9ee86cf97f9ba8f6139c83f57b8d5848e7f90e4 (patch)
tree160cfb488d9016646eec3083f85b3ef68bba95e9 /src/server/internals
parentd19cadd40c053b1074c739caa2c65b2d2fac2941 (diff)
downloadingen-b9ee86cf97f9ba8f6139c83f57b8d5848e7f90e4.tar.gz
ingen-b9ee86cf97f9ba8f6139c83f57b8d5848e7f90e4.tar.bz2
ingen-b9ee86cf97f9ba8f6139c83f57b8d5848e7f90e4.zip
Update for latest atom extension.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4172 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/internals')
-rw-r--r--src/server/internals/Controller.cpp5
-rw-r--r--src/server/internals/Note.cpp8
-rw-r--r--src/server/internals/Trigger.cpp5
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;