summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_ring_buffer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-06-08 01:21:01 +0000
committerCarl Hetherington <carl@carlh.net>2010-06-08 01:21:01 +0000
commite67a6d8989453d906a676d3afbe9d65bb0fa3d02 (patch)
treeea5ba3a04b24efaabd58d8fa628cabb8556f6d92 /libs/ardour/midi_ring_buffer.cc
parente6becb342553ee3197a2f4cf3e23f1118d91383b (diff)
Update ring buffer read pointer correctly in case of a failure to insert an event into the MidiBuffer.
git-svn-id: svn://localhost/ardour2/branches/3.0@7241 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_ring_buffer.cc')
-rw-r--r--libs/ardour/midi_ring_buffer.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc
index 2d5eedb6eb..60c0a18a9b 100644
--- a/libs/ardour/midi_ring_buffer.cc
+++ b/libs/ardour/midi_ring_buffer.cc
@@ -99,6 +99,7 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes
uint8_t* write_loc = dst.reserve(ev_time, ev_size);
if (write_loc == NULL) {
// cerr << "MRB: Unable to reserve space in buffer, event skipped";
+ this->skip (ev_size); // Advance read pointer to next event
continue;
}