- virtual nframes_t read_unlocked (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nframes_t stamp_offset) const = 0;
- virtual nframes_t write_unlocked (MidiRingBuffer& dst, nframes_t cnt) = 0;
-
- mutable Glib::Mutex _lock;
- string _captured_for;
- mutable uint32_t _read_data_count; ///< modified in read()
- mutable uint32_t _write_data_count; ///< modified in write()
-
- MidiModel _model;
-
- private:
- bool file_changed (string path);
+ virtual void flush_midi() = 0;
+
+ virtual nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
+ framepos_t position,
+ framepos_t start, nframes_t cnt,
+ MidiStateTracker* tracker) const = 0;
+
+ virtual nframes_t write_unlocked (MidiRingBuffer<nframes_t>& dst,
+ framepos_t position,
+ nframes_t cnt) = 0;
+
+ std::string _captured_for;
+ mutable uint32_t _read_data_count; ///< modified in read()
+ mutable uint32_t _write_data_count; ///< modified in write()
+
+ boost::shared_ptr<MidiModel> _model;
+ bool _writing;
+
+ mutable Evoral::Sequence<Evoral::MusicalTime>::const_iterator _model_iter;
+ mutable bool _model_iter_valid;
+
+ mutable double _length_beats;
+ mutable framepos_t _last_read_end;
+ framepos_t _last_write_end;
+
+ /** Map of interpolation styles to use for Parameters; if they are not in this map,
+ * the correct interpolation style can be obtained from EventTypeMap::interpolation_of ()
+ */
+ typedef std::map<Evoral::Parameter, Evoral::ControlList::InterpolationStyle> InterpolationStyleMap;
+ InterpolationStyleMap _interpolation_style;
+
+ /** Map of automation states to use for Parameters; if they are not in this map,
+ * the correct automation state is Off.
+ */
+ typedef std::map<Evoral::Parameter, AutoState> AutomationStateMap;
+ AutomationStateMap _automation_state;