From b728d3c9ff7541251ab9d11123125a54d000e740 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 1 Feb 2016 15:15:02 -0500 Subject: clean up mess in Route/Track controllables caused by not understanding the significance of ParameterDescriptor --- libs/ardour/route_controls.cc | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) (limited to 'libs/ardour/route_controls.cc') diff --git a/libs/ardour/route_controls.cc b/libs/ardour/route_controls.cc index ee4c453c35..08e083e3fe 100644 --- a/libs/ardour/route_controls.cc +++ b/libs/ardour/route_controls.cc @@ -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 alist, - boost::shared_ptr r) - : AutomationControl (r->session(), Evoral::Parameter (atype), desc, alist, name) - , _route (r) -{ -} - Route::GainControllable::GainControllable (Session& s, AutomationType atype, boost::shared_ptr r) : GainControl (s, Evoral::Parameter(atype)) , _route (r) @@ -266,6 +256,9 @@ double Route::PhaseControllable::get_value () const { boost::shared_ptr 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 r) - : RouteAutomationControl (name, SoloIsolateAutomation, get_descriptor(), boost::shared_ptr(), r) + : RouteAutomationControl (name, SoloIsolateAutomation, boost::shared_ptr(), r) { boost::shared_ptr 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 r) - : RouteAutomationControl (name, SoloSafeAutomation, get_descriptor(), boost::shared_ptr(), r) + : RouteAutomationControl (name, SoloSafeAutomation, boost::shared_ptr(), r) { boost::shared_ptr 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; -} -- cgit v1.2.3