clean up mess in Route/Track controllables caused by not understanding the significan...
authorPaul Davis <paul@linuxaudiosystems.com>
Mon, 1 Feb 2016 20:15:02 +0000 (15:15 -0500)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 1 Feb 2016 20:15:02 +0000 (15:15 -0500)
libs/ardour/ardour/route.h
libs/ardour/ardour/track.h
libs/ardour/route.cc
libs/ardour/route_controls.cc
libs/ardour/track.cc

index dce7caed02b73eb08a8dd81e360391b4adf8f6ad..84d78fcdd3d51d94410485b2c3168db7fe050fb1 100644 (file)
@@ -391,13 +391,6 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
                                        AutomationType atype,
                                        boost::shared_ptr<AutomationList> alist,
                                        boost::shared_ptr<Route> route);
-
-               RouteAutomationControl (const std::string& name,
-                                       AutomationType atype,
-                                       const ParameterDescriptor& descriptor,
-                                       boost::shared_ptr<AutomationList> alist,
-                                       boost::shared_ptr<Route> route);
-
        protected:
                friend class Route;
 
@@ -478,7 +471,6 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
                double get_value () const;
        private:
                void _set_value (double, PBD::Controllable::GroupControlDisposition group_override);
-               static ParameterDescriptor get_descriptor ();
        };
 
        class LIBARDOUR_API SoloSafeControllable : public RouteAutomationControl {
@@ -489,7 +481,6 @@ class LIBARDOUR_API Route : public SessionObject, public Automatable, public Rou
                double get_value () const;
        private:
                void _set_value (double, PBD::Controllable::GroupControlDisposition group_override);
-               static ParameterDescriptor get_descriptor ();
        };
 
        void set_control (AutomationType, double val, PBD::Controllable::GroupControlDisposition group_override);
index dcc0352157a94159a61590ed933d0170c0bcebfa..ee05666d202d100bcdd9a94feb355c27b8c378b6 100644 (file)
@@ -59,7 +59,6 @@ class LIBARDOUR_API Track : public Route, public PublicDiskstream
                double get_value () const;
        private:
                void _set_value (double, PBD::Controllable::GroupControlDisposition group_override);
-               static ParameterDescriptor get_descriptor();
        };
 
        void set_monitoring (MonitorChoice, PBD::Controllable::GroupControlDisposition group_override);
index d8c5c2e3b77f4b8fe06c6ed4250877baadf0ba28..79fbeb546ead94a6de43c8150585c751629984c5 100644 (file)
@@ -4115,6 +4115,7 @@ Route::set_phase_invert (uint32_t c, bool yn)
        if (_phase_invert[c] != yn) {
                _phase_invert[c] = yn;
                phase_invert_changed (); /* EMIT SIGNAL */
+               _phase_control->Changed(); /* EMIT SIGNAL */
                _session.set_dirty ();
        }
 }
index ee4c453c35e8fa0eaf453b82cdf446844bef3c89..08e083e3fe11dad9a610799c80c692e798a886a7 100644 (file)
@@ -94,16 +94,6 @@ Route::RouteAutomationControl::RouteAutomationControl (const std::string& name,
 {
 }
 
-Route::RouteAutomationControl::RouteAutomationControl (const std::string& name,
-                                                       AutomationType atype,
-                                                       const ParameterDescriptor& desc,
-                                                       boost::shared_ptr<AutomationList> alist,
-                                                       boost::shared_ptr<Route> r)
-       : AutomationControl (r->session(), Evoral::Parameter (atype), desc, alist, name)
-       , _route (r)
-{
-}
-
 Route::GainControllable::GainControllable (Session& s, AutomationType atype, boost::shared_ptr<Route> r)
        : GainControl (s, Evoral::Parameter(atype))
        , _route (r)
@@ -266,6 +256,9 @@ double
 Route::PhaseControllable::get_value () const
 {
        boost::shared_ptr<Route> r = _route.lock ();
+       if (!r) {
+               return 0.0;
+       }
        return (double) r->phase_invert (_current_phase);
 }
 
@@ -282,7 +275,7 @@ Route::PhaseControllable::channel () const
 }
 
 Route::SoloIsolateControllable::SoloIsolateControllable (std::string name, boost::shared_ptr<Route> r)
-       : RouteAutomationControl (name, SoloIsolateAutomation, get_descriptor(), boost::shared_ptr<AutomationList>(), r)
+       : RouteAutomationControl (name, SoloIsolateAutomation, boost::shared_ptr<AutomationList>(), r)
 {
        boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(SoloIsolateAutomation)));
        gl->set_interpolation(Evoral::ControlList::Discrete);
@@ -319,17 +312,8 @@ Route::SoloIsolateControllable::_set_value (double val, PBD::Controllable::Group
        r->set_solo_isolated (val >= 0.5 ? true : false);
 }
 
-ParameterDescriptor
-Route::SoloIsolateControllable::get_descriptor()
-{
-       ParameterDescriptor desc;
-       desc.type = SoloIsolateAutomation;
-       desc.toggled = true;
-       return desc;
-}
-
 Route::SoloSafeControllable::SoloSafeControllable (std::string name, boost::shared_ptr<Route> r)
-       : RouteAutomationControl (name, SoloSafeAutomation, get_descriptor(), boost::shared_ptr<AutomationList>(), r)
+       : RouteAutomationControl (name, SoloSafeAutomation, boost::shared_ptr<AutomationList>(), r)
 {
        boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(SoloSafeAutomation)));
        gl->set_interpolation(Evoral::ControlList::Discrete);
@@ -365,11 +349,3 @@ Route::SoloSafeControllable::get_value () const
        return r->solo_safe() ? 1.0 : 0.0;
 }
 
-ParameterDescriptor
-Route::SoloSafeControllable::get_descriptor()
-{
-       ParameterDescriptor desc;
-       desc.type = SoloSafeAutomation;
-       desc.toggled = true;
-       return desc;
-}
index 9c2a538f5e120e60cac7630bace61b126003edea..f279eae3069cbab3dfcedad52c45868b2357c238 100644 (file)
@@ -1166,7 +1166,7 @@ Track::metering_state () const
 }
 
 Track::MonitoringControllable::MonitoringControllable (std::string name, boost::shared_ptr<Track> r)
-       : RouteAutomationControl (name, MonitoringAutomation, get_descriptor(), boost::shared_ptr<AutomationList>(), r)
+       : RouteAutomationControl (name, MonitoringAutomation, boost::shared_ptr<AutomationList>(), r)
 {
        boost::shared_ptr<AutomationList> gl(new AutomationList(Evoral::Parameter(MonitoringAutomation)));
        gl->set_interpolation(Evoral::ControlList::Discrete);
@@ -1218,15 +1218,3 @@ Track::MonitoringControllable::get_value () const
 
        return t->monitoring_choice();
 }
-
-ParameterDescriptor
-Track::MonitoringControllable::get_descriptor()
-{
-       ParameterDescriptor desc;
-       desc.type = MonitoringAutomation;
-       desc.enumeration = true;
-       desc.integer_step = true;
-       desc.lower = MonitorAuto;
-       desc.upper = MonitorDisk; /* XXX bump when we add MonitorCue */
-       return desc;
-}