13
0

triggerbox: fix return value from MidiTrigger::run() when there was an event

last_event_samples was being set to buffer/process()-relative samples, but
needed to be timeline-relative samples.
This commit is contained in:
Paul Davis 2021-12-04 13:25:33 -07:00
parent 65c69b6818
commit c1de82f833

View File

@ -1338,7 +1338,7 @@ MIDITrigger::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sam
*/
samplepos_t buffer_samples = timeline_samples - start_sample + dest_offset;
last_event_samples = buffer_samples;
last_event_samples = timeline_samples;
const Evoral::Event<MidiBuffer::TimeType> ev (Evoral::MIDI_EVENT, buffer_samples, next_event.size(), const_cast<uint8_t*>(next_event.buffer()), false);
DEBUG_TRACE (DEBUG::Triggers, string_compose ("inserting %1\n", ev));