From d7bbc9078ff2215e254940089f5de56076c1780b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 18 Sep 2023 21:10:30 -0600 Subject: [PATCH] another instance where we should use timecnt_t::set_time_domain() --- libs/ardour/region.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 8c2f2a36b0..1bb01d97da 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -530,14 +530,9 @@ Region::set_length_internal (timecnt_t const & len) */ if (td != len.time_domain()) { - switch (td) { - case Temporal::AudioTime: - _length = timecnt_t::from_superclock (len.superclocks(), _length.val().position()); - break; - default: - _length = timecnt_t::from_ticks (len.ticks(), _length.val().position()); - break; - } + timecnt_t l = _length.val(); + l.set_time_domain (td); + _length = l; return; } }