diff options
Diffstat (limited to 'libs/ardour/midi_buffer.cc')
-rw-r--r-- | libs/ardour/midi_buffer.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libs/ardour/midi_buffer.cc b/libs/ardour/midi_buffer.cc index 6e07a1bedd..dee4885505 100644 --- a/libs/ardour/midi_buffer.cc +++ b/libs/ardour/midi_buffer.cc @@ -506,6 +506,16 @@ MidiBuffer::merge_in_place(const MidiBuffer &other) } else if (them != other.end()) { + if ((*us).time() < ((*them).time())) { + + /* just append the rest of other */ + + memcpy (_data + us.offset, other._data + them.offset, other._size - them.offset); + _size += other._size - them.offset; + assert(_size <= _capacity); + break; + } + /* to get here implies that we've encountered two * messages with the same timestamp. we must order * them correctly. |