13
0

Complain when MidiBuffer::merge_from fails due to buffer full

We were previously dropping MIDI data silently
This commit is contained in:
Hector Martin 2020-11-10 20:58:53 +09:00
parent 0979097cae
commit a568b3c7c2

View File

@ -136,7 +136,10 @@ MidiBuffer::merge_from (const Buffer& src, samplecnt_t /*nframes*/, sampleoffset
assert (mbuf != this);
/* XXX use nframes, and possible offsets */
merge_in_place (*mbuf);
if (!merge_in_place (*mbuf)) {
cerr << string_compose ("MidiBuffer::merge_in_place failed (buffer is full: size: %1 capacity %2 new bytes %3)", _size, _capacity, mbuf->size()) << endl;
PBD::stacktrace (cerr, 20);
}
}
/** Push an event into the buffer.