From df37c62e37f5ec256803f2d42d1d673fd42f161e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 13 Jan 2021 16:52:25 -0700 Subject: [PATCH] mute controls starts with its stripable's time domain --- libs/ardour/ardour/mute_control.h | 2 +- libs/ardour/automatable.cc | 2 +- libs/ardour/mute_control.cc | 4 ++-- libs/ardour/route.cc | 2 +- libs/ardour/vca.cc | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/ardour/ardour/mute_control.h b/libs/ardour/ardour/mute_control.h index c39467bd0b..28839f7495 100644 --- a/libs/ardour/ardour/mute_control.h +++ b/libs/ardour/ardour/mute_control.h @@ -37,7 +37,7 @@ class Muteable; class LIBARDOUR_API MuteControl : public SlavableAutomationControl { public: - MuteControl (Session& session, std::string const& name, Muteable&); + MuteControl (Session& session, std::string const& name, Muteable&, Temporal::TimeDomain td); double get_value () const; double get_save_value() const { return muted_by_self(); } diff --git a/libs/ardour/automatable.cc b/libs/ardour/automatable.cc index 93261651be..5c47c8134f 100644 --- a/libs/ardour/automatable.cc +++ b/libs/ardour/automatable.cc @@ -590,7 +590,7 @@ Automatable::control_factory(const Evoral::Parameter& param) } else if (param.type() == MuteAutomation) { Muteable* m = dynamic_cast(this); if (m) { - control = new MuteControl (_a_session, X_("mute"), *m); + control = new MuteControl (_a_session, X_("mute"), *m, time_domain()); } } diff --git a/libs/ardour/mute_control.cc b/libs/ardour/mute_control.cc index 93a2111b3b..2c7a2f3fd8 100644 --- a/libs/ardour/mute_control.cc +++ b/libs/ardour/mute_control.cc @@ -30,9 +30,9 @@ using namespace std; #warning NUTEMPO QUESTION what time domain shoudl this really use? -MuteControl::MuteControl (Session& session, std::string const & name, Muteable& m) +MuteControl::MuteControl (Session& session, std::string const & name, Muteable& m, Temporal::TimeDomain td) : SlavableAutomationControl (session, MuteAutomation, ParameterDescriptor (MuteAutomation), - boost::shared_ptr (new AutomationList (Evoral::Parameter (MuteAutomation), Temporal::AudioTime)), + boost::shared_ptr (new AutomationList (Evoral::Parameter (MuteAutomation), td)), name) , _muteable (m) { diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 04cd5ced39..b231815834 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -169,7 +169,7 @@ Route::init () add_control (_solo_control); _solo_control->Changed.connect_same_thread (*this, boost::bind (&Route::solo_control_changed, this, _1, _2)); - _mute_control.reset (new MuteControl (_session, X_("mute"), *this)); + _mute_control.reset (new MuteControl (_session, X_("mute"), *this, time_domain())); add_control (_mute_control); _phase_control.reset (new PhaseControl (_session, X_("phase"))); diff --git a/libs/ardour/vca.cc b/libs/ardour/vca.cc index c2e943bc58..232b7d629d 100644 --- a/libs/ardour/vca.cc +++ b/libs/ardour/vca.cc @@ -80,7 +80,7 @@ int VCA::init () { _solo_control.reset (new SoloControl (_session, X_("solo"), *this, *this)); - _mute_control.reset (new MuteControl (_session, X_("mute"), *this)); + _mute_control.reset (new MuteControl (_session, X_("mute"), *this, time_domain())); add_control (_gain_control); add_control (_solo_control);