revert incorrect include path changes and removal of export macros for two libardour...
[ardour.git] / libs / ardour / ardour / midi_region.h
index 9e8c7441fc072de8bf08eb36cbfbce260f37e1a5..b326bb30d87a0f8df2794240535de47b3ee45497 100644 (file)
@@ -34,8 +34,9 @@ namespace ARDOUR {
                   property, but it allows us to signal changes to the
                   MidiModel used by the MidiRegion
                */
-               extern PBD::PropertyDescriptor<void*> midi_data;
-               extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats;
+               LIBARDOUR_API extern PBD::PropertyDescriptor<void*> midi_data;
+               LIBARDOUR_API extern PBD::PropertyDescriptor<Evoral::MusicalTime> start_beats;
+               LIBARDOUR_API extern PBD::PropertyDescriptor<Evoral::MusicalTime> length_beats;
        }
 }
 
@@ -52,16 +53,17 @@ class MidiFilter;
 class MidiModel;
 class MidiSource;
 class MidiStateTracker;
+
 template<typename T> class MidiRingBuffer;
 
-class MidiRegion : public Region
+class LIBARDOUR_API MidiRegion : public Region
 {
   public:
        static void make_property_quarks ();
 
        ~MidiRegion();
 
-       boost::shared_ptr<MidiRegion> clone () const;
+       boost::shared_ptr<MidiRegion> clone (std::string path = std::string()) const;
 
        boost::shared_ptr<MidiSource> midi_source (uint32_t n=0) const;
 
@@ -76,7 +78,7 @@ class MidiRegion : public Region
                            NoteMode  mode = Sustained,
                            MidiStateTracker* tracker = 0) const;
 
-       framepos_t master_read_at (MidiRingBuffer<framepos_t>& dst,
+       framecnt_t master_read_at (MidiRingBuffer<framepos_t>& dst,
                                   framepos_t position,
                                   framecnt_t dur,
                                   uint32_t  chan_n = 0,
@@ -95,8 +97,6 @@ class MidiRegion : public Region
 
        /* export */
 
-       int exportme (ARDOUR::Session&, ARDOUR::ExportSpecification&);
-
        boost::shared_ptr<MidiModel> model();
        boost::shared_ptr<const MidiModel> model() const;
 
@@ -111,6 +111,7 @@ class MidiRegion : public Region
 
   private:
        friend class RegionFactory;
+       PBD::Property<Evoral::MusicalTime> _start_beats;
        PBD::Property<Evoral::MusicalTime> _length_beats;
 
        MidiRegion (const SourceList&);
@@ -132,12 +133,16 @@ class MidiRegion : public Region
 
        void set_position_internal (framepos_t pos, bool allow_bbt_recompute);
        void set_length_internal (framecnt_t len);
+       void set_start_internal (framecnt_t);
        void update_length_beats ();
 
        void model_changed ();
        void model_automation_state_changed (Evoral::Parameter const &);
        void model_contents_changed ();
 
+       void set_start_beats_from_start_frames ();
+       void update_after_tempo_map_change ();
+
        std::set<Evoral::Parameter> _filtered_parameters; ///< parameters that we ask our source not to return when reading
        PBD::ScopedConnection _model_connection;
        PBD::ScopedConnection _source_connection;