forward port ConfigVariable<bool> fix from 2.X
[ardour.git] / libs / ardour / ardour / midi_playlist.h
index 11c1288e92d907ebee801e651f02ba298204bb41..ccadb39e92ee4c8db6e8813050c2561388807b33 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2006 Paul Davis
-       Written by Dave Robillard, 2006
+    Written by Dave Robillard, 2006
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -25,6 +25,7 @@
 
 #include "ardour/ardour.h"
 #include "ardour/playlist.h"
+#include "ardour/midi_state_tracker.h"
 #include "evoral/Parameter.hpp"
 
 namespace ARDOUR
@@ -50,7 +51,7 @@ public:
        nframes_t read (MidiRingBuffer<nframes_t>& buf,
                        nframes_t start, nframes_t cnt, uint32_t chan_n=0);
 
-       int set_state (const XMLNode&);
+       int set_state (const XMLNode&, int version);
 
        bool destroy_region (boost::shared_ptr<Region>);
 
@@ -58,6 +59,8 @@ public:
 
        std::set<Evoral::Parameter> contained_automation();
 
+       void clear_note_trackers ();
+
 protected:
 
        /* playlist "callbacks" */
@@ -71,9 +74,13 @@ protected:
 private:
        void dump () const;
 
-       bool region_changed (Change, boost::shared_ptr<Region>);
+       bool region_changed (const PBD::PropertyChange&, boost::shared_ptr<Region>);
 
        NoteMode _note_mode;
+
+       typedef std::map<Region*,MidiStateTracker*> NoteTrackers;
+       NoteTrackers _note_trackers;
+
 };
 
 } /* namespace ARDOUR */