summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_ring_buffer.cc
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-05 02:04:56 +0000
committerDavid Robillard <d@drobilla.net>2009-05-05 02:04:56 +0000
commit9faf3bd048f48e34cd41e4ea8d8ca15e1446854b (patch)
tree2582526e8f9082c07c2e4920928d2acdb1955e6a /libs/ardour/midi_ring_buffer.cc
parent83c27fa88879e20cd7ec8a87865dc2d3d91d1a88 (diff)
Fix crash when playing back MIDI within a loop.
Fixes mantis issue #0002570. git-svn-id: svn://localhost/ardour2/branches/3.0@5052 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_ring_buffer.cc')
-rw-r--r--libs/ardour/midi_ring_buffer.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/libs/ardour/midi_ring_buffer.cc b/libs/ardour/midi_ring_buffer.cc
index 469222d5d7..746dc3b3eb 100644
--- a/libs/ardour/midi_ring_buffer.cc
+++ b/libs/ardour/midi_ring_buffer.cc
@@ -65,14 +65,12 @@ MidiRingBuffer<T>::read(MidiBuffer& dst, nframes_t start, nframes_t end, nframes
// This event marks a loop end (i.e. the next event's timestamp will be non-monotonic)
if (ev_type == LoopEventType) {
- ev_time -= start;
+ /*ev_time -= start;
ev_time += offset;
- Evoral::MIDIEvent<T> loopevent(LoopEventType, ev_time);
- dst.push_back(loopevent);
-
- // We can safely return, without reading the data, because
- // a LoopEvent does not have data.
- cerr << "MRB loop boundary @ " << ev_time << endl;
+ cerr << "MRB loop boundary @ " << ev_time << endl;*/
+
+ // Return without reading data or writing to buffer (loop events have no data)
+ // FIXME: This is not correct, loses events after the loop this cycle
return count + 1;
}