From e72ce1317e0b0000eba985cc27c793fd3a1cf2ef Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 13 Jan 2021 15:13:46 -0700 Subject: [PATCH] record enable control starts with its route's time domain --- libs/ardour/ardour/record_enable_control.h | 2 +- libs/ardour/record_enable_control.cc | 5 ++--- libs/ardour/track.cc | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/libs/ardour/ardour/record_enable_control.h b/libs/ardour/ardour/record_enable_control.h index 6efe271d4c..e15f464e22 100644 --- a/libs/ardour/ardour/record_enable_control.h +++ b/libs/ardour/ardour/record_enable_control.h @@ -36,7 +36,7 @@ class Session; class LIBARDOUR_API RecordEnableControl : public SlavableAutomationControl { public: - RecordEnableControl (Session& session, std::string const & name, Recordable& m); + RecordEnableControl (Session& session, std::string const & name, Recordable& m, Temporal::TimeDomain); ~RecordEnableControl() {} /* Most (Slavable)AutomationControls do not override this, but we need diff --git a/libs/ardour/record_enable_control.cc b/libs/ardour/record_enable_control.cc index f079b699cb..b36a49ceee 100644 --- a/libs/ardour/record_enable_control.cc +++ b/libs/ardour/record_enable_control.cc @@ -24,10 +24,9 @@ using namespace ARDOUR; using namespace PBD; -#warning NUTEMPO QUESTION what time domain should this really use? -RecordEnableControl::RecordEnableControl (Session& session, std::string const & name, Recordable& r) +RecordEnableControl::RecordEnableControl (Session& session, std::string const & name, Recordable& r, Temporal::TimeDomain td) : SlavableAutomationControl (session, RecEnableAutomation, ParameterDescriptor (RecEnableAutomation), - boost::shared_ptr(new AutomationList(Evoral::Parameter(RecEnableAutomation), Temporal::AudioTime)), + boost::shared_ptr(new AutomationList(Evoral::Parameter(RecEnableAutomation), td)), name) , _recordable (r) { diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index 171c026831..ff0f2ff323 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -104,7 +104,7 @@ Track::init () boost::shared_ptr rp (boost::dynamic_pointer_cast (shared_from_this())); boost::shared_ptr rt = boost::dynamic_pointer_cast (rp); - _record_enable_control.reset (new RecordEnableControl (_session, EventTypeMap::instance().to_symbol (RecEnableAutomation), *this)); + _record_enable_control.reset (new RecordEnableControl (_session, EventTypeMap::instance().to_symbol (RecEnableAutomation), *this, time_domain())); add_control (_record_enable_control); _record_safe_control.reset (new RecordSafeControl (_session, EventTypeMap::instance().to_symbol (RecSafeAutomation), *this));