summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2016-02-16 15:36:43 +0100
committerRobin Gareus <robin@gareus.org>2016-02-16 15:36:43 +0100
commitcbdae785118863cf04a4d9cf63524801f55b8df5 (patch)
tree6146fcc9ed2d7848a0bbb9613cedefa5533658ed
parentc1910351a5379553da6d062fe40f3d8da90910f4 (diff)
try to catch https://github.com/rncbc/synthv1/issues/1#issuecomment-183041991
(n_samples = 64 but Ardour sends midi-buffer with an event at 960) some guesses as to why: - split cycle for looping (nominal: 1024, cycle split:64) - plugin uses _session.transport_frame() directly :( (not latency compensated offset or looped position) - "offset" is not taken into account for midi buffers - tempo/metric change (metric iterator is wrong after loop)
-rw-r--r--libs/ardour/lv2_plugin.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index 507e546adc..81266b8ed4 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -2155,6 +2155,7 @@ LV2Plugin::connect_and_run(BufferSet& bufs,
? *metric_i : NULL;
if (m != m_end && (!metric || metric->frame() > (*m).time())) {
const Evoral::MIDIEvent<framepos_t> ev(*m, false);
+ assert (ev.time() < nframes);
LV2_Evbuf_Iterator eend = lv2_evbuf_end(_ev_buffers[port_index]);
lv2_evbuf_write(&eend, ev.time(), 0, type, ev.size(), ev.buffer());
++m;