Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
[ardour.git] / libs / ardour / ardour / midi_source.h
index 33a0c3c1fa8cd6e4b744da039386121e48931ce3..a7b47efe21fe01b0ecf390a98a220a828e48a6bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
     Copyright (C) 2006 Paul Davis
-       Written by Dave Robillard, 2006
+    Author: David Robillard
 
     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
@@ -48,8 +48,8 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
        MidiSource (Session& session, const XMLNode&);
        virtual ~MidiSource ();
 
-        boost::shared_ptr<MidiSource> clone (Evoral::MusicalTime begin = Evoral::MinMusicalTime, 
-                                             Evoral::MusicalTime end = Evoral::MaxMusicalTime);
+       boost::shared_ptr<MidiSource> clone (Evoral::MusicalTime begin = Evoral::MinMusicalTime,
+                                            Evoral::MusicalTime end = Evoral::MaxMusicalTime);
 
        /** Read the data in a given time range from the MIDI source.
         * All time stamps in parameters are in audio frames (even if the source has tempo time).
@@ -78,9 +78,10 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
        virtual framecnt_t length (framepos_t pos) const;
        virtual void       update_length (framepos_t pos, framecnt_t cnt);
 
-       virtual void mark_streaming_midi_write_started (NoteMode mode, framepos_t start_time);
+       virtual void mark_streaming_midi_write_started (NoteMode mode);
        virtual void mark_streaming_write_started ();
        virtual void mark_streaming_write_completed ();
+       void mark_write_starting_now ();
 
        virtual void session_saved();
 
@@ -97,6 +98,9 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
 
        bool length_mutable() const { return true; }
 
+       void set_length_beats(double l) { _length_beats = l; }
+       double length_beats() const { return _length_beats; }
+
        virtual void load_model(bool lock=true, bool force_reload=false) = 0;
        virtual void destroy_model() = 0;
 
@@ -150,7 +154,7 @@ class MidiSource : virtual public Source, public boost::enable_shared_from_this<
        mutable Evoral::Sequence<Evoral::MusicalTime>::const_iterator _model_iter;
        mutable bool                                                  _model_iter_valid;
 
-       mutable double    _length_beats;
+       mutable double     _length_beats;
        mutable framepos_t _last_read_end;
        framepos_t         _last_write_end;