From c21332df7146008f359ae52918f2695b39c6b3b8 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 21 Sep 2016 17:18:48 -0500 Subject: gain controls are supposed to be "gain-like" --- libs/ardour/ardour/automation_control.h | 4 +++- libs/ardour/ardour/slavable_automation_control.h | 10 ++++++---- libs/ardour/automation_control.cc | 8 +++++--- libs/ardour/gain_control.cc | 5 +++-- libs/ardour/slavable_automation_control.cc | 5 +++-- 5 files changed, 20 insertions(+), 12 deletions(-) (limited to 'libs') diff --git a/libs/ardour/ardour/automation_control.h b/libs/ardour/ardour/automation_control.h index e15abbec46..158996133c 100644 --- a/libs/ardour/ardour/automation_control.h +++ b/libs/ardour/ardour/automation_control.h @@ -58,7 +58,9 @@ class LIBARDOUR_API AutomationControl const Evoral::Parameter& parameter, const ParameterDescriptor& desc, boost::shared_ptr l=boost::shared_ptr(), - const std::string& name=""); + const std::string& name="", + PBD::Controllable::Flag flags=PBD::Controllable::Flag (0) + ); ~AutomationControl (); diff --git a/libs/ardour/ardour/slavable_automation_control.h b/libs/ardour/ardour/slavable_automation_control.h index 45b555595f..7e46dd5a74 100644 --- a/libs/ardour/ardour/slavable_automation_control.h +++ b/libs/ardour/ardour/slavable_automation_control.h @@ -29,10 +29,12 @@ class LIBARDOUR_API SlavableAutomationControl : public AutomationControl { public: SlavableAutomationControl(ARDOUR::Session&, - const Evoral::Parameter& parameter, - const ParameterDescriptor& desc, - boost::shared_ptr l=boost::shared_ptr(), - const std::string& name=""); + const Evoral::Parameter& parameter, + const ParameterDescriptor& desc, + boost::shared_ptr l=boost::shared_ptr(), + const std::string& name="", + PBD::Controllable::Flag flags=PBD::Controllable::Flag (0) + ); double get_value () const; diff --git a/libs/ardour/automation_control.cc b/libs/ardour/automation_control.cc index e27da6ab08..9a6590ebe8 100644 --- a/libs/ardour/automation_control.cc +++ b/libs/ardour/automation_control.cc @@ -49,8 +49,10 @@ AutomationControl::AutomationControl(ARDOUR::Session& s const Evoral::Parameter& parameter, const ParameterDescriptor& desc, boost::shared_ptr list, - const string& name) - : Controllable (name.empty() ? EventTypeMap::instance().to_symbol(parameter) : name) + const string& name, + Controllable::Flag flags) + + : Controllable (name.empty() ? EventTypeMap::instance().to_symbol(parameter) : name, flags) , Evoral::Control(parameter, desc, list) , _session(session) , _desc(desc) @@ -123,7 +125,7 @@ AutomationControl::actually_set_value (double value, PBD::Controllable::GroupCon Control::set_double (value, _session.transport_frame(), to_list); //AutomationType at = (AutomationType) _parameter.type(); - //std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value + //std::cerr << "++++ Changed (" << enum_2_string (at) << ", " << enum_2_string (gcd) << ") = " << value //<< " (was " << old_value << ") @ " << this << std::endl; Changed (true, gcd); diff --git a/libs/ardour/gain_control.cc b/libs/ardour/gain_control.cc index 8910c9a98c..d100273640 100644 --- a/libs/ardour/gain_control.cc +++ b/libs/ardour/gain_control.cc @@ -35,8 +35,9 @@ using namespace std; GainControl::GainControl (Session& session, const Evoral::Parameter ¶m, boost::shared_ptr al) : SlavableAutomationControl (session, param, ParameterDescriptor(param), al ? al : boost::shared_ptr (new AutomationList (param)), - param.type() == GainAutomation ? X_("gaincontrol") : X_("trimcontrol")) { - + param.type() == GainAutomation ? X_("gaincontrol") : X_("trimcontrol"), + Controllable::GainLike) +{ alist()->reset_default (1.0); lower_db = accurate_coefficient_to_dB (_desc.lower); diff --git a/libs/ardour/slavable_automation_control.cc b/libs/ardour/slavable_automation_control.cc index d4002343e8..a80598439d 100644 --- a/libs/ardour/slavable_automation_control.cc +++ b/libs/ardour/slavable_automation_control.cc @@ -32,8 +32,9 @@ SlavableAutomationControl::SlavableAutomationControl(ARDOUR::Session& s, const Evoral::Parameter& parameter, const ParameterDescriptor& desc, boost::shared_ptr l, - const std::string& name) - : AutomationControl (s, parameter, desc, l, name) + const std::string& name, + Controllable::Flag flags) + : AutomationControl (s, parameter, desc, l, name, flags) { } -- cgit v1.2.3