diff options
-rw-r--r-- | lv2/core.lv2/meta.ttl | 2 | ||||
-rw-r--r-- | plugins/eg-midigate.lv2/midigate.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lv2/core.lv2/meta.ttl b/lv2/core.lv2/meta.ttl index dd9650a..9aafd2e 100644 --- a/lv2/core.lv2/meta.ttl +++ b/lv2/core.lv2/meta.ttl @@ -45,6 +45,8 @@ THIS SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH R rdfs:label "Fix lv2.h missing from installation." ] , [ rdfs:label "Fix documentation build with Python 3.7." + ] , [ + rdfs:label "eg-midigate: Fix output timing." ] ] ] , [ diff --git a/plugins/eg-midigate.lv2/midigate.c b/plugins/eg-midigate.lv2/midigate.c index 7b77079..d98f670 100644 --- a/plugins/eg-midigate.lv2/midigate.c +++ b/plugins/eg-midigate.lv2/midigate.c @@ -160,6 +160,9 @@ run(LV2_Handle instance, uint32_t sample_count) uint32_t offset = 0; LV2_ATOM_SEQUENCE_FOREACH (self->control, ev) { + write_output(self, offset, (uint32_t)(ev->time.frames - offset)); + offset = (uint32_t)ev->time.frames; + if (ev->body.type == self->uris.midi_MidiEvent) { const uint8_t* const msg = (const uint8_t*)(ev + 1); switch (lv2_midi_message_type(msg)) { @@ -185,9 +188,6 @@ run(LV2_Handle instance, uint32_t sample_count) break; } } - - write_output(self, offset, (uint32_t)(ev->time.frames - offset)); - offset = (uint32_t)ev->time.frames; } write_output(self, offset, sample_count - offset); |