aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg-fifths.lv2/fifths.c
diff options
context:
space:
mode:
authorRuoxi Wang <thuwrx10@gmail.com>2020-02-25 16:19:54 +0800
committerDavid Robillard <d@drobilla.net>2020-03-17 14:30:04 +0100
commit3aad5eb1b08ed5c27e60aa36021c4a85ce90c08f (patch)
tree41cac1b6af7aa36ee0a2e70ce858613b966c65b6 /plugins/eg-fifths.lv2/fifths.c
parent0e0a6feb46618750c235a2da88b5434ca3dd9b73 (diff)
downloadlv2-3aad5eb1b08ed5c27e60aa36021c4a85ce90c08f.tar.xz
Use LV2_ATOM_BODY macros in examples instead of pointer arithmetic
Diffstat (limited to 'plugins/eg-fifths.lv2/fifths.c')
-rw-r--r--plugins/eg-fifths.lv2/fifths.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/eg-fifths.lv2/fifths.c b/plugins/eg-fifths.lv2/fifths.c
index 0abcfbd..5782417 100644
--- a/plugins/eg-fifths.lv2/fifths.c
+++ b/plugins/eg-fifths.lv2/fifths.c
@@ -128,7 +128,7 @@ run(LV2_Handle instance,
// Read incoming events
LV2_ATOM_SEQUENCE_FOREACH(self->in_port, ev) {
if (ev->body.type == uris->midi_Event) {
- const uint8_t* const msg = (const uint8_t*)(ev + 1);
+ const uint8_t* const msg = (const uint8_t*)LV2_ATOM_BODY_CONST(ev);
switch (lv2_midi_message_type(msg)) {
case LV2_MIDI_MSG_NOTE_ON:
case LV2_MIDI_MSG_NOTE_OFF: