diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h index 0675583ee4..859df381b0 100644 --- a/libs/ardour/ardour/region.h +++ b/libs/ardour/ardour/region.h @@ -115,6 +115,7 @@ public: const DataType& data_type () const { return _type; } Temporal::TimeDomain time_domain() const; virtual void globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to); + virtual void change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to); /** How the region parameters play together: * diff --git a/libs/ardour/ardour/utils.h b/libs/ardour/ardour/utils.h index e180ae510d..37788b321e 100644 --- a/libs/ardour/ardour/utils.h +++ b/libs/ardour/ardour/utils.h @@ -124,8 +124,8 @@ template std::shared_ptr route_list_to_contro return cl; } -template std::shared_ptr stripable_list_to_control_list (StripableList& sl, std::shared_ptr (Stripable::*get_control)() const) { - std::shared_ptr cl (new ControlList); +template std::shared_ptr stripable_list_to_control_list (StripableList& sl, std::shared_ptr (Stripable::*get_control)() const) { + std::shared_ptr cl (new AutomationControlList); for (auto const & s : sl) { std::shared_ptr ac = (s.get()->*get_control)(); if (ac) { @@ -135,8 +135,8 @@ template std::shared_ptr stripable_list_to_control_list return cl; } -template std::shared_ptr stripable_list_to_control_list (std::shared_ptr sl, std::shared_ptr (Stripable::*get_control)() const) { - std::shared_ptr cl (new ControlList); +template std::shared_ptr stripable_list_to_control_list (std::shared_ptr sl, std::shared_ptr (Stripable::*get_control)() const) { + std::shared_ptr cl (new AutomationControlList); for (auto const & s : *sl) { std::shared_ptr ac = (s.get()->*get_control)(); if (ac) { diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index 1c290d2db9..8b2017ac9e 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -783,17 +783,11 @@ Location::globally_change_time_domain (Temporal::TimeDomain from, Temporal::Time if (_start.time_domain() == from) { - std::cerr << "switching location [" << name() << "] from " << _start; - _start.set_time_domain (to); _end.set_time_domain (to); - std::cerr << " to " << _start << std::endl; - domain_swap->add (_start); domain_swap->add (_end); - } else { - std::cerr << name() << " wrong domain: " << _start << " .. " << _end << std::endl; } } diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index bce89ec1b5..902efff5d8 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -2251,12 +2251,14 @@ Region::globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDo { assert (Temporal::domain_swap); + /* recall that the _length member is a timecnt_t, and so holds both + * position *and* length. + */ + if (_length.val().time_domain() == from) { timecnt_t& l (_length.non_const_val()); - std::cerr << "old domain after GCTD " << _length.val() << std::endl; l.set_time_domain (to); Temporal::domain_swap->add (l); - std::cerr << "new domain after GCTD " << _length.val() << std::endl; } } diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index db61df1d06..b98d1d9d08 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -302,8 +302,6 @@ Session::any_duration_to_samples (samplepos_t position, AnyTime const & duration void Session::globally_change_time_domain (Temporal::TimeDomain from, Temporal::TimeDomain to) { - std::cerr << "GCTD from " << from << " to " << to << std::endl; - { std::shared_ptr rl (routes.reader());