work-around case where metric is NULL in split cycles.

This really needs to be fixed on a higher level.
e.g Pluin::connect_and_run() needs to be passed the current time identical to
PluginInsert::connect_and_run()
This commit is contained in:
Robin Gareus 2016-02-16 18:17:13 +01:00
parent cbdae78511
commit 31442cd63d

View File

@ -2155,9 +2155,10 @@ 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());
if (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;
} else {
tmetric.set_metric(metric);