- int init (string idstr, bool must_exist);
-
- nframes_t read_unlocked (
- MidiRingBuffer<nframes_t>& dst,
- nframes_t start,
- nframes_t cn,
- nframes_t stamp_offset,
- nframes_t negative_stamp_offset) const;
-
- nframes_t write_unlocked (
- MidiRingBuffer<nframes_t>& src,
- nframes_t cnt);
-
- bool find (std::string path, bool must_exist, bool& is_new);
- bool removable() const;
- bool writable() const { return _flags & Writable; }
-
- void set_default_controls_interpolation();
-
- Glib::ustring _path;
- string _take_id;
- bool _allow_remove_if_empty;
- double _last_ev_time_beats;
- nframes_t _last_ev_time_frames;
-
- static string _search_path;
+ int open_for_write ();
+
+ framecnt_t read_unlocked (Evoral::EventSink<framepos_t>& dst,
+ framepos_t position,
+ framepos_t start,
+ framecnt_t cnt,
+ MidiStateTracker* tracker) const;
+
+ framecnt_t write_unlocked (MidiRingBuffer<framepos_t>& src,
+ framepos_t position,
+ framecnt_t cnt);
+
+ double _last_ev_time_beats;
+ framepos_t _last_ev_time_frames;
+ /** end time (start + duration) of last call to read_unlocked */
+ mutable framepos_t _smf_last_read_end;
+ /** time (in SMF ticks, 1 tick per _ppqn) of the last event read by read_unlocked */
+ mutable framepos_t _smf_last_read_time;