MIDI rec-rect: apply offset, correctly position notes
This commit is contained in:
parent
08cd4b2083
commit
35394f427c
|
@ -643,9 +643,12 @@ DiskWriter::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
|
||||||
|
|
||||||
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
|
for (MidiBuffer::iterator i = buf.begin(); i != buf.end(); ++i) {
|
||||||
/* This may fail if buf is larger than _gui_feed_buffer, but it's not really
|
/* This may fail if buf is larger than _gui_feed_buffer, but it's not really
|
||||||
the end of the world if it does.
|
* the end of the world if it does.
|
||||||
*/
|
*/
|
||||||
_gui_feed_buffer.push_back ((*i).time() + start_sample, Evoral::MIDI_EVENT, (*i).size(), (*i).buffer());
|
samplepos_t mpos = (*i).time() + start_sample - _accumulated_capture_offset;
|
||||||
|
if (mpos >= _first_recordable_sample) {
|
||||||
|
_gui_feed_buffer.push_back (mpos, Evoral::MIDI_EVENT, (*i).size(), (*i).buffer());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user