From 12847b01252b291e1593e240097bff301fb6182b Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 14 Dec 2021 13:23:07 -0700 Subject: [PATCH] remove Session::bbt_time() and use TempoMap::use()->bbt_at() explicitly everywhere --- libs/ardour/ardour/session.h | 1 - libs/ardour/session_time.cc | 8 -------- libs/surfaces/mackie/mackie_control_protocol.cc | 4 +++- libs/surfaces/osc/osc_global_observer.cc | 4 +++- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index 8b5e9b3d9e..21fd024669 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -793,7 +793,6 @@ public: void sync_time_vars(); - void bbt_time (Temporal::timepos_t const & when, Temporal::BBT_Time&); void timecode_to_sample(Timecode::Time& timecode, samplepos_t& sample, bool use_offset, bool use_subframes) const; void sample_to_timecode(samplepos_t sample, Timecode::Time& timecode, bool use_offset, bool use_subframes) const; void timecode_time (Timecode::Time &); diff --git a/libs/ardour/session_time.cc b/libs/ardour/session_time.cc index 2f447f4f8f..e596d2ca75 100644 --- a/libs/ardour/session_time.cc +++ b/libs/ardour/session_time.cc @@ -45,14 +45,6 @@ using namespace Temporal; #define TFSM_EVENT(evtype) { _transport_fsm->enqueue (new TransportFSM::Event (evtype)); } -/* BBT TIME*/ - -void -Session::bbt_time (timepos_t const & when, Temporal::BBT_Time& bbt) -{ - bbt = TempoMap::use()->bbt_at (when); -} - /* Timecode TIME */ double diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc index 1789ce5e02..df11350f4e 100644 --- a/libs/surfaces/mackie/mackie_control_protocol.cc +++ b/libs/surfaces/mackie/mackie_control_protocol.cc @@ -67,6 +67,8 @@ #include "ardour/audioengine.h" #include "ardour/vca_manager.h" +#include "temporal/tempo.h" + #include "mackie_control_protocol.h" #include "midi_byte_array.h" @@ -1155,7 +1157,7 @@ MackieControlProtocol::format_bbt_timecode (samplepos_t now_sample) { Temporal::BBT_Time bbt_time; - session->bbt_time (timepos_t (now_sample), bbt_time); + bbt_time = Temporal::TempoMap::use()->bbt_at (timepos_t (now_sample)); // The Mackie protocol spec is built around a BBT time display of // diff --git a/libs/surfaces/osc/osc_global_observer.cc b/libs/surfaces/osc/osc_global_observer.cc index 492162fee8..579daee54c 100644 --- a/libs/surfaces/osc/osc_global_observer.cc +++ b/libs/surfaces/osc/osc_global_observer.cc @@ -27,6 +27,8 @@ #include "ardour/meter.h" #include "ardour/monitor_processor.h" +#include "temporal/tempo.h" + #include "osc.h" #include "osc_global_observer.h" @@ -244,7 +246,7 @@ OSCGlobalObserver::tick () if (feedback[5]) { // Bar beat enabled Temporal::BBT_Time bbt_time; - session->bbt_time (timepos_t (now_sample), bbt_time); + bbt_time = Temporal::TempoMap::use()->bbt_at (timepos_t (now_sample)); // semantics: BBB/bb/tttt ostringstream os;