add MidiModel::sync_to_source() to push model state into its existing source; mark...
[ardour.git] / libs / ardour / ardour / smf_source.h
index e02f8eddc05241efd167f20e97e838894e1e39d8..d271cb0dbad5bb7144197109a1a048e270a63d28 100644 (file)
@@ -37,7 +37,7 @@ template<typename T> class MidiRingBuffer;
 class SMFSource : public MidiSource, public FileSource, public Evoral::SMF {
 public:
        /** Constructor for existing external-to-session files */
-       SMFSource (Session& session, const Glib::ustring& path, bool embedded,
+       SMFSource (Session& session, const Glib::ustring& path, 
                        Source::Flag flags = Source::Flag(0));
 
        /** Constructor for existing in-session files */
@@ -70,7 +70,7 @@ public:
        static bool safe_midi_file_extension (const Glib::ustring& path);
 
 private:
-       nframes_t read_unlocked (MidiRingBuffer<nframes_t>& dst,
+       nframes_t read_unlocked (Evoral::EventSink<nframes_t>& dst,
                                 sframes_t position,
                                 sframes_t start,
                                 nframes_t cnt,
@@ -86,7 +86,10 @@ private:
 
        double    _last_ev_time_beats;
        sframes_t _last_ev_time_frames;
+       /** end time (start + duration) of last call to read_unlocked */
        mutable sframes_t _smf_last_read_end;
+       /** time (in SMF ticks, 1 tick per _ppqn) of the last event read by read_unlocked */
+       mutable sframes_t _smf_last_read_time;
 };
 
 }; /* namespace ARDOUR */