From 7dadddb3dc11c286f621facfd73d8efa35feea1c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 23 Aug 2025 22:32:58 -0600 Subject: [PATCH] temporal: provide TempoMap::global_fetch() This always returns a shared ptr to the global tempo map, without setting the thread-local pointer --- libs/temporal/temporal/tempo.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/temporal/temporal/tempo.h b/libs/temporal/temporal/tempo.h index bf441ee01b..738dda4392 100644 --- a/libs/temporal/temporal/tempo.h +++ b/libs/temporal/temporal/tempo.h @@ -747,6 +747,8 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible LIBTEMPORAL_API static void update_thread_tempo_map() { _tempo_map_p = _map_mgr.reader(); } LIBTEMPORAL_API static SharedPtr use() { assert (_tempo_map_p); return _tempo_map_p; } LIBTEMPORAL_API static SharedPtr fetch() { assert (fetch_condition()); update_thread_tempo_map(); return _tempo_map_p; } + /* No fetch condition for this, to be used only in association with LocalTempoMapScope */ + LIBTEMPORAL_API static SharedPtr global_fetch() { return _map_mgr.reader(); } /* Used only by the ARDOUR::AudioEngine API to reset the process thread * tempo map only when it has changed.