13
0

use RTMidiBuffer API correctly when reading for MidiTrack::export_stuff()

This commit is contained in:
Paul Davis 2020-05-01 23:37:49 -06:00
parent 4508d5bab1
commit 520ccd8ff2

View File

@ -499,9 +499,8 @@ MidiTrack::export_stuff (BufferSet& buffers,
buffers.get_midi(0).clear();
MidiStateTracker ignored;
if (mpl->rendered()->read(buffers.get_midi(0), start, nframes, ignored, 0) != nframes) {
return -1;
}
/* XXX thsi doesn't fail, other than if the lock cannot be obtained */
uint32_t cnt = mpl->rendered()->read(buffers.get_midi(0), start, start+nframes, ignored, start);
if (endpoint && !for_export) {
MidiBuffer& buf = buffers.get_midi(0);