From 64fd52c380f2c6e04f0f3a7bd6f51ba2b2aa31fe Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Fri, 27 Nov 2020 22:20:52 -0700 Subject: [PATCH] ensure that AudioEngine backend-created threads have tempo map related thread private vars set --- libs/ardour/audioengine.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index b48df17fb9..3d9ef510d0 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -41,6 +41,9 @@ #include "pbd/pthread_utils.h" #include "pbd/unknown_type.h" +#include "temporal/superclock.h" +#include "temporal/tempo.h" + #include "midi++/port.h" #include "midi++/mmc.h" @@ -1426,6 +1429,9 @@ AudioEngine::thread_init_callback (void* arg) PBD::notify_event_loops_about_thread_creation (pthread_self(), thread_name, 4096); AsyncMIDIPort::set_process_thread (pthread_self()); + Temporal::_thread_sample_rate = 44100; /* will change later as appropriate */ + Temporal::TempoMap::fetch (); + if (arg) { delete AudioEngine::instance()->_main_thread; /* the special thread created/managed by the backend */