Fix code style
[ardour.git] / libs / ardour / ardour / route.h
index 53766350763c90a13cfd6cd80d630200c95d049b..bfd894375be86804b65d0558cb9837e0e8c758ea 100644 (file)
@@ -71,12 +71,14 @@ class DiskWriter;
 class IOProcessor;
 class Panner;
 class PannerShell;
+class PolarityProcessor;
 class PortSet;
 class Processor;
 class PluginInsert;
 class RouteGroup;
 class Send;
 class InternalReturn;
+class Location;
 class MonitorControl;
 class MonitorProcessor;
 class Pannable;
@@ -132,6 +134,8 @@ public:
        boost::shared_ptr<MonitorControl> monitoring_control() const { return _monitoring_control; }
 
        MonitorState monitoring_state () const;
+       virtual MonitorState get_auto_monitoring_state () const { return MonitoringSilence; }
+
        virtual MeterState metering_state () const;
 
        /* these are the core of the API of a Route. see the protected sections as well */
@@ -151,6 +155,7 @@ public:
        virtual void realtime_locate () {}
        virtual void non_realtime_locate (samplepos_t);
        virtual void set_pending_declick (int);
+       void set_loop (ARDOUR::Location *);
 
        /* end of vfunc-based API */
 
@@ -351,6 +356,8 @@ public:
        PBD::Signal0<void> denormal_protection_changed;
        PBD::Signal0<void> comment_changed;
 
+       bool is_track();
+
        /** track numbers - assigned by session
         * nubers > 0 indicate tracks (audio+midi)
         * nubers < 0 indicate busses
@@ -390,10 +397,9 @@ public:
        PBD::Signal0<void>       io_changed;
 
        /* stateful */
-
        XMLNode& get_state();
+       XMLNode& get_template();
        virtual int set_state (const XMLNode&, int version);
-       virtual XMLNode& get_template();
 
        XMLNode& get_processor_state ();
        void set_processor_state (const XMLNode&);
@@ -528,6 +534,7 @@ public:
        boost::shared_ptr<AutomationControl> filter_slope_controllable (bool) const;
        boost::shared_ptr<AutomationControl> filter_enable_controllable (bool) const;
 
+       boost::shared_ptr<AutomationControl> tape_drive_controllable () const;
 
        /* "well-known" controls for a compressor in this route. Any or all may
         * be null.
@@ -558,6 +565,7 @@ public:
         */
        boost::shared_ptr<AutomationControl> send_level_controllable (uint32_t n) const;
        boost::shared_ptr<AutomationControl> send_enable_controllable (uint32_t n) const;
+       boost::shared_ptr<AutomationControl> send_pan_azi_controllable (uint32_t n) const;
        /* for the same value of @param n, this returns the name of the send
         * associated with the pair of controllables returned by the above two methods.
         */
@@ -597,11 +605,9 @@ protected:
 
        virtual int no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing);
 
-       void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
-
-       void passthru (BufferSet&, samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, int declick, bool gain_automation_ok, bool run_disk_reader);
-
-       virtual void write_out_of_band_data (BufferSet& /* bufs */, samplepos_t /* start_sample */, samplepos_t /* end_sample */, samplecnt_t /* nframes */) {}
+       virtual void snapshot_out_of_band_data (samplecnt_t /* nframes */) {}
+       virtual void write_out_of_band_data (BufferSet&, samplecnt_t /* nframes */) const {}
+       virtual void update_controls (BufferSet const&) {}
 
        void process_output_buffers (BufferSet& bufs,
                                     samplepos_t start_sample, samplepos_t end_sample,
@@ -659,12 +665,10 @@ protected:
        bool           _denormal_protection;
 
        bool _recordable : 1;
-       bool _silent : 1;
        bool _declickable : 1;
 
        boost::shared_ptr<SoloControl> _solo_control;
        boost::shared_ptr<MuteControl> _mute_control;
-       boost::shared_ptr<PhaseControl> _phase_control;
        boost::shared_ptr<SoloIsolateControl> _solo_isolate_control;
        boost::shared_ptr<SoloSafeControl> _solo_safe_control;
 
@@ -674,16 +678,14 @@ protected:
        FedBy          _fed_by;
 
        InstrumentInfo _instrument_info;
+       Location*      _loop_location;
 
        virtual ChanCount input_streams () const;
 
-       virtual XMLNode& state(bool);
+       virtual XMLNode& state (bool save_template);
 
        int configure_processors (ProcessorStreams*);
 
-       void passthru_silence (samplepos_t start_sample, samplepos_t end_sample,
-                              pframes_t nframes, int declick);
-
        void silence (samplecnt_t);
        void silence_unlocked (samplecnt_t);
 
@@ -695,11 +697,13 @@ protected:
 
        virtual void maybe_declick (BufferSet&, samplecnt_t, int);
 
-       boost::shared_ptr<GainControl> _gain_control;
-       boost::shared_ptr<Amp>       _amp;
-       boost::shared_ptr<GainControl> _trim_control;
-       boost::shared_ptr<Amp>       _trim;
-       boost::shared_ptr<PeakMeter> _meter;
+       boost::shared_ptr<GainControl>  _gain_control;
+       boost::shared_ptr<GainControl>  _trim_control;
+       boost::shared_ptr<PhaseControl> _phase_control;
+       boost::shared_ptr<Amp>               _amp;
+       boost::shared_ptr<Amp>               _trim;
+       boost::shared_ptr<PeakMeter>         _meter;
+       boost::shared_ptr<PolarityProcessor> _polarity;
 
        boost::shared_ptr<DelayLine> _delayline;
 
@@ -748,6 +752,9 @@ private:
 
        pframes_t latency_preroll (pframes_t nframes, samplepos_t& start_sample, samplepos_t& end_sample);
 
+       void run_route (samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, int declick, bool gain_automation_ok, bool run_disk_reader);
+       void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
+
        void reset_instrument_info ();
        void solo_control_changed (bool self, PBD::Controllable::GroupControlDisposition);
        void maybe_note_meter_position ();