diff options
author | David Robillard <d@drobilla.net> | 2016-11-08 20:34:45 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-11-08 20:34:45 -0500 |
commit | c61373212a87e519276d4c011994e2d37c77ee16 (patch) | |
tree | 216e0fcd47e24cd8db0511a074d2d203cb18fa5e /libs/ardour/ardour/midi_region.h | |
parent | 72297c0ca31400767177bbcb9310721c481a7dd8 (diff) |
Support multiple readers for MIDI source/model
Fixes the multiple reader issue #6541 properly without resorting to a
linear search kludge.
All the read state has been pulled out into a MidiCursor which the
caller is required to pass. The playlist keeps cursors for all the
regions it is reading, any number of cursors are allowed at a time.
MidiCursor should probably be made a smarter and more fool-proof
object (and/or possibly merged with some of the other tracker/fixer
stuff) but for now I wanted to keep it simple.
Diffstat (limited to 'libs/ardour/ardour/midi_region.h')
-rw-r--r-- | libs/ardour/ardour/midi_region.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h index 0ad60a900c..d3a6cbbbb8 100644 --- a/libs/ardour/ardour/midi_region.h +++ b/libs/ardour/ardour/midi_region.h @@ -45,6 +45,7 @@ template<typename Time> class EventSink; namespace ARDOUR { class MidiChannelFilter; +class MidiCursor; class MidiFilter; class MidiModel; class MidiSource; @@ -77,6 +78,7 @@ class LIBARDOUR_API MidiRegion : public Region framepos_t position, framecnt_t dur, Evoral::Range<framepos_t>* loop_range, + MidiCursor& cursor, uint32_t chan_n = 0, NoteMode mode = Sustained, MidiStateTracker* tracker = 0, @@ -86,6 +88,7 @@ class LIBARDOUR_API MidiRegion : public Region framepos_t position, framecnt_t dur, Evoral::Range<framepos_t>* loop_range, + MidiCursor& cursor, uint32_t chan_n = 0, NoteMode mode = Sustained) const; @@ -130,6 +133,7 @@ class LIBARDOUR_API MidiRegion : public Region framepos_t position, framecnt_t dur, Evoral::Range<framepos_t>* loop_range, + MidiCursor& cursor, uint32_t chan_n = 0, NoteMode mode = Sustained, MidiStateTracker* tracker = 0, |