Set up region BBT time when frame position changes, if the region is glued to BBT...
[ardour.git] / libs / ardour / ardour / track.h
index 6e7d9ae1e57da0ee8033ceafaf5c9b28959cb187..496b1e195bd3e2fe1cd40772fcbd186a66f02cf0 100644 (file)
@@ -48,14 +48,19 @@ class Track : public Route, public PublicDiskstream
        virtual bool can_use_mode (TrackMode /*m*/, bool& /*bounce_required*/) { return false; }
        PBD::Signal0<void> TrackModeChanged;
 
+       virtual void set_monitoring (MonitorChoice);
+       MonitorChoice monitoring_choice() const { return _monitoring; }
+       MonitorState monitoring_state();
+       PBD::Signal0<void> MonitoringChanged;
+
        virtual int no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                            bool state_changing, bool can_record);
+                            bool state_changing);
 
        int silent_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                        bool can_record, bool& need_butler);
+                        bool& need_butler);
 
        virtual int roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
-                         int declick, bool can_record, bool& need_butler) = 0;
+                         int declick, bool& need_butler) = 0;
 
        bool needs_butler() const { return _needs_butler; }
        void toggle_monitor_input ();
@@ -85,7 +90,7 @@ class Track : public Route, public PublicDiskstream
 
        XMLNode&    get_state();
        XMLNode&    get_template();
-       virtual int set_state (const XMLNode&, int version) = 0;
+       virtual int set_state (const XMLNode&, int version);
        static void zero_diskstream_id_in_xml (XMLNode&);
 
        boost::shared_ptr<PBD::Controllable> rec_enable_control() { return _rec_enable_control; }
@@ -93,8 +98,7 @@ class Track : public Route, public PublicDiskstream
        bool record_enabled() const;
        void set_record_enabled (bool yn, void *src);
 
-       /* XXX: unfortunate that this is exposed */
-       PBD::ID const & diskstream_id () const;
+       bool using_diskstream_id (PBD::ID) const;
 
        void set_block_size (pframes_t);
 
@@ -115,8 +119,6 @@ class Track : public Route, public PublicDiskstream
        float capture_buffer_load () const;
        int do_refill ();
        int do_flush (RunContext, bool force = false);
-       uint32_t read_data_count() const;
-       uint32_t write_data_count() const;
        void set_pending_overwrite (bool);
        int seek (framepos_t, bool complete_refill = false);
        bool hidden () const;
@@ -158,12 +160,17 @@ class Track : public Route, public PublicDiskstream
        PBD::Signal0<void> AlignmentStyleChanged;
 
   protected:
-       virtual XMLNode& state (bool full) = 0;
+       XMLNode& state (bool full);
 
        boost::shared_ptr<Diskstream> _diskstream;
-       MeterPoint  _saved_meter_point;
-       TrackMode   _mode;
-       bool        _needs_butler;
+       MeterPoint    _saved_meter_point;
+       /** used to keep track of processors that we are deactivating during record,
+           if `do-not-record-plugins' is enabled.
+       */
+       std::list<boost::weak_ptr<Processor> > _deactivated_processors;
+       TrackMode     _mode;
+       bool          _needs_butler;
+       MonitorChoice _monitoring;
 
        //private: (FIXME)
        struct FreezeRecordProcessorInfo {
@@ -212,10 +219,17 @@ class Track : public Route, public PublicDiskstream
        framecnt_t check_initial_delay (framecnt_t nframes, framecnt_t&);
 
 private:
+
+       virtual boost::shared_ptr<Diskstream> diskstream_factory (XMLNode const &) = 0;
+       
        void diskstream_playlist_changed ();
        void diskstream_record_enable_changed ();
        void diskstream_speed_changed ();
        void diskstream_alignment_style_changed ();
+
+       void parameter_changed (std::string);
+       void deactivate_visible_processors ();
+       void activate_deactivated_processors ();
 };
 
 }; /* namespace ARDOUR*/