MCP: Mixbus32C: Restore missing filter controls to the Dyn page.
[ardour.git] / libs / ardour / ardour / route.h
index 2e2c1ccf7221e3624b1c87a10d4ac5380732e96e..038e750d01602942a63804dea3c75360d924ae07 100644 (file)
@@ -28,7 +28,6 @@
 
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
-#include <boost/enable_shared_from_this.hpp>
 
 #include <glibmm/threads.h>
 #include "pbd/fastlog.h"
@@ -84,26 +83,18 @@ class SoloIsolateControl;
 class PhaseControl;
 class MonitorControl;
 
-class LIBARDOUR_API Route : public GraphNode,
-                            public Stripable,
+class LIBARDOUR_API Route : public Stripable,
+                            public GraphNode,
                             public Soloable,
                             public Muteable,
                             public Monitorable,
-                            public Automatable,
-                            public RouteGroupMember,
-                            public boost::enable_shared_from_this<Route>
+                            public RouteGroupMember
 {
 public:
 
        typedef std::list<boost::shared_ptr<Processor> > ProcessorList;
 
-       enum Flag {
-               Auditioner = 0x1,
-               MasterOut = 0x2,
-               MonitorOut = 0x4
-       };
-
-       Route (Session&, std::string name, Flag flags = Flag(0), DataType default_type = DataType::AUDIO);
+       Route (Session&, std::string name, PresentationInfo::Flag flags = PresentationInfo::Flag(0), DataType default_type = DataType::AUDIO);
        virtual ~Route();
 
        virtual int init ();
@@ -127,14 +118,6 @@ public:
        bool set_name (const std::string& str);
        static void set_name_in_state (XMLNode &, const std::string &, bool rename_playlist = true);
 
-       uint32_t order_key () const;
-       bool has_order_key () const;
-       void set_order_key (uint32_t);
-
-       bool is_auditioner() const { return _flags & Auditioner; }
-       bool is_master() const { return _flags & MasterOut; }
-       bool is_monitor() const { return _flags & MonitorOut; }
-
        MonitorState monitoring_state () const;
        virtual MeterState metering_state () const;
 
@@ -237,6 +220,8 @@ public:
        RoutePinWindowProxy * pinmgr_proxy () const { return _pinmgr_proxy; }
        void set_pingmgr_proxy (RoutePinWindowProxy* wp) { _pinmgr_proxy = wp ; }
 
+       boost::shared_ptr<AutomationControl> automation_control_recurse (PBD::ID const & id) const;
+
        /* special processors */
 
        boost::shared_ptr<InternalSend>     monitor_send() const { return _monitor_send; }
@@ -293,6 +278,7 @@ public:
        void ab_plugins (bool forward);
        void clear_processors (Placement);
        void all_visible_processors_active (bool);
+       void move_instrument_down (bool postfader = false);
 
        bool strict_io () const { return _strict_io; }
        bool set_strict_io (bool);
@@ -373,7 +359,9 @@ public:
 
        /** the processors have changed; the parameter indicates what changed */
        PBD::Signal1<void,RouteProcessorChange> processors_changed;
+       PBD::Signal0<void> fan_out; // used to signal the GUI to fan-out (track-creation)
        PBD::Signal1<void,void*> record_enable_changed;
+       PBD::Signal0<void> processor_latency_changed;
        /** the metering point has changed */
        PBD::Signal0<void>       meter_change;
        PBD::Signal0<void>       signal_latency_changed;
@@ -382,10 +370,6 @@ public:
        /** Emitted with the process lock held */
        PBD::Signal0<void>       io_changed;
 
-       /* gui's call this for their own purposes. */
-
-       PBD::Signal2<void,std::string,void*> gui_changed;
-
        /* stateful */
 
        XMLNode& get_state();
@@ -395,6 +379,8 @@ public:
        XMLNode& get_processor_state ();
        virtual void set_processor_state (const XMLNode&);
 
+       boost::weak_ptr<Route> weakroute ();
+
        int save_as_template (const std::string& path, const std::string& name);
 
        PBD::Signal1<void,void*> SelectedChanged;
@@ -457,7 +443,7 @@ public:
                return _mute_control;
        }
 
-       bool can_be_muted_by_others () const { return !is_master(); }
+       bool can_be_muted_by_others () const { return can_solo(); }
        bool muted () const { return _mute_control->muted(); }
        bool muted_by_masters () const { return _mute_control->muted_by_masters(); }
        bool muted_by_self () const { return _mute_control->muted_by_self(); }
@@ -525,6 +511,11 @@ public:
        boost::shared_ptr<AutomationControl> eq_enable_controllable () const;
        boost::shared_ptr<AutomationControl> eq_hpf_controllable () const;
 
+       //additional filter params (currently 32C only )
+       boost::shared_ptr<AutomationControl> eq_lpf_controllable () const;
+       boost::shared_ptr<AutomationControl> filter_enable_controllable () const;
+
+
        /* "well-known" controls for a compressor in this route. Any or all may
         * be null.
         */
@@ -533,7 +524,7 @@ public:
        boost::shared_ptr<AutomationControl> comp_speed_controllable () const;
        boost::shared_ptr<AutomationControl> comp_mode_controllable () const;
        boost::shared_ptr<AutomationControl> comp_makeup_controllable () const;
-       boost::shared_ptr<AutomationControl> comp_redux_controllable () const;
+       boost::shared_ptr<ReadOnlyControl>   comp_redux_controllable () const;
 
        /* @param mode must be supplied by the comp_mode_controllable(). All other values
         * result in undefined behaviour
@@ -569,28 +560,6 @@ public:
 
        void protect_automation ();
 
-       enum {
-               /* These numbers are taken from MIDI Machine Control,
-                  which can only control up to 317 tracks without
-                  doing sysex segmentation.
-               */
-               MasterBusRemoteControlID = 318,
-               MonitorBusRemoteControlID = 319,
-       };
-
-       void     set_remote_control_id (uint32_t id, bool notify_class_listeners = true);
-       uint32_t remote_control_id () const;
-       void     set_remote_control_id_explicit (uint32_t order_key);
-
-       /* for things concerned about *this* route's RID */
-
-       PBD::Signal0<void> RemoteControlIDChanged;
-
-       /* for things concerned about *any* route's RID changes */
-
-       static PBD::Signal0<void> RemoteControlIDChange;
-       static PBD::Signal0<void> SyncOrderKeys;
-
        bool has_external_redirects() const;
 
        /* can only be executed by a route for which is_monitor() is true
@@ -600,6 +569,7 @@ public:
                        pframes_t nframes, int declick);
 
         bool slaved_to (boost::shared_ptr<VCA>) const;
+        bool slaved () const;
 
   protected:
         friend class Session;
@@ -626,6 +596,8 @@ public:
                                             pframes_t nframes, int declick,
                                             bool gain_automation_ok);
 
+       void flush_processor_buffers_locked (framecnt_t nframes);
+
        virtual void bounce_process (BufferSet& bufs,
                                     framepos_t start_frame, framecnt_t nframes,
                                                                                                                         boost::shared_ptr<Processor> endpoint, bool include_endpoint,
@@ -663,7 +635,6 @@ public:
        gint           _pending_process_reorder; // atomic
        gint           _pending_signals; // atomic
 
-       Flag           _flags;
        int            _pending_declick;
        MeterPoint     _meter_point;
        MeterPoint     _pending_meter_point;
@@ -718,16 +689,12 @@ protected:
 
        boost::shared_ptr<Processor> the_instrument_unlocked() const;
 
-private:
+  private:
+       int64_t _track_number;
+
        int set_state_2X (const XMLNode&, int);
        void set_processor_state_2X (XMLNodeList const &, int);
 
-       uint32_t _order_key;
-       bool _has_order_key;
-       uint32_t _remote_control_id;
-
-       int64_t _track_number;
-
        void input_change_handler (IOChange, void *src);
        void output_change_handler (IOChange, void *src);
        void sidechain_change_handler (IOChange, void *src);
@@ -810,7 +777,6 @@ private:
 
        void reset_instrument_info ();
 
-       void set_remote_control_id_internal (uint32_t id, bool notify_class_listeners = true);
         void solo_control_changed (bool self, PBD::Controllable::GroupControlDisposition);
 };