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_playlist.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_playlist.h')
-rw-r--r-- | libs/ardour/ardour/midi_playlist.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/ardour/ardour/midi_playlist.h b/libs/ardour/ardour/midi_playlist.h index ad0a812cba..3c031a994f 100644 --- a/libs/ardour/ardour/midi_playlist.h +++ b/libs/ardour/ardour/midi_playlist.h @@ -26,6 +26,7 @@ #include <boost/utility.hpp> #include "ardour/ardour.h" +#include "ardour/midi_cursor.h" #include "ardour/midi_model.h" #include "ardour/midi_state_tracker.h" #include "ardour/note_fixer.h" @@ -112,12 +113,14 @@ public: protected: void remove_dependents (boost::shared_ptr<Region> region); + void region_going_away (boost::weak_ptr<Region> region); private: typedef Evoral::Note<Evoral::Beats> Note; typedef Evoral::Event<framepos_t> Event; struct RegionTracker : public boost::noncopyable { + MidiCursor cursor; ///< Cursor (iterator and read state) MidiStateTracker tracker; ///< Active note tracker NoteFixer fixer; ///< Edit compensation }; |