use new libtemporal sample rate mechanism (libs edition)
This commit is contained in:
parent
5bef968069
commit
c64db47b37
@ -198,6 +198,10 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
|
||||
|
||||
static AudioEngine* instance() { return _instance; }
|
||||
static void destroy();
|
||||
|
||||
/* this method is intended only to be used as a "fast" callback from libtemporal */
|
||||
static int static_sample_rate () { return _instance->sample_rate(); }
|
||||
|
||||
void died ();
|
||||
|
||||
/* The backend will cause these at the appropriate time(s) */
|
||||
|
@ -288,8 +288,6 @@ AudioEngine::process_callback (pframes_t nframes)
|
||||
thread_init_callback (NULL);
|
||||
}
|
||||
|
||||
#warning NUTEMPO session sample rate or backend sample rate?
|
||||
Temporal::set_thread_sample_rate (sample_rate());
|
||||
Temporal::TempoMap::fetch ();
|
||||
|
||||
/* This is for JACK, where the latency callback arrives in sync with
|
||||
@ -1433,7 +1431,6 @@ 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::set_thread_sample_rate (44100); /* will change later as appropriate */
|
||||
Temporal::TempoMap::fetch ();
|
||||
|
||||
if (arg) {
|
||||
|
@ -211,7 +211,6 @@ Butler::thread_work ()
|
||||
}
|
||||
}
|
||||
|
||||
Temporal::_thread_sample_rate = _session.sample_rate ();
|
||||
Temporal::TempoMap::fetch ();
|
||||
|
||||
restart:
|
||||
|
@ -524,6 +524,8 @@ ARDOUR::init (bool try_optimization, const char* localedir, bool with_gui)
|
||||
return true;
|
||||
}
|
||||
|
||||
Temporal::set_sample_rate_callback (AudioEngine::static_sample_rate);
|
||||
|
||||
running_from_gui = with_gui;
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@ -538,7 +538,6 @@ again:
|
||||
void
|
||||
Graph::setup_thread_local_variables ()
|
||||
{
|
||||
Temporal::set_thread_sample_rate (AudioEngine::instance()->sample_rate());
|
||||
Temporal::TempoMap::fetch ();
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include <glibmm/threads.h>
|
||||
|
||||
#include "temporal/superclock.h"
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/auditioner.h"
|
||||
@ -72,7 +72,7 @@ using namespace std;
|
||||
void
|
||||
Session::setup_thread_local_variables ()
|
||||
{
|
||||
Temporal::set_thread_sample_rate (sample_rate());
|
||||
Temporal::TempoMap::fetch ();
|
||||
}
|
||||
|
||||
/** Called by the audio engine when there is work to be done with JACK.
|
||||
|
@ -383,7 +383,6 @@ ControlProtocol::notify_stripable_selection_changed (StripableNotificationListPt
|
||||
void
|
||||
ControlProtocol::event_loop_precall ()
|
||||
{
|
||||
Temporal::set_thread_sample_rate (session->sample_rate());
|
||||
Temporal::TempoMap::fetch ();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user