mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-12 09:36:33 +01:00
use new libtemporal sample rate mechanism (libs edition)
This commit is contained in:
parent
5bef968069
commit
c64db47b37
7 changed files with 8 additions and 8 deletions
|
|
@ -198,6 +198,10 @@ class LIBARDOUR_API AudioEngine : public PortManager, public SessionHandlePtr
|
||||||
|
|
||||||
static AudioEngine* instance() { return _instance; }
|
static AudioEngine* instance() { return _instance; }
|
||||||
static void destroy();
|
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 ();
|
void died ();
|
||||||
|
|
||||||
/* The backend will cause these at the appropriate time(s) */
|
/* The backend will cause these at the appropriate time(s) */
|
||||||
|
|
|
||||||
|
|
@ -288,8 +288,6 @@ AudioEngine::process_callback (pframes_t nframes)
|
||||||
thread_init_callback (NULL);
|
thread_init_callback (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
#warning NUTEMPO session sample rate or backend sample rate?
|
|
||||||
Temporal::set_thread_sample_rate (sample_rate());
|
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
/* This is for JACK, where the latency callback arrives in sync with
|
/* 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);
|
PBD::notify_event_loops_about_thread_creation (pthread_self(), thread_name, 4096);
|
||||||
AsyncMIDIPort::set_process_thread (pthread_self());
|
AsyncMIDIPort::set_process_thread (pthread_self());
|
||||||
|
|
||||||
Temporal::set_thread_sample_rate (44100); /* will change later as appropriate */
|
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
if (arg) {
|
if (arg) {
|
||||||
|
|
|
||||||
|
|
@ -211,7 +211,6 @@ Butler::thread_work ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Temporal::_thread_sample_rate = _session.sample_rate ();
|
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
|
|
|
||||||
|
|
@ -524,6 +524,8 @@ ARDOUR::init (bool try_optimization, const char* localedir, bool with_gui)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Temporal::set_sample_rate_callback (AudioEngine::static_sample_rate);
|
||||||
|
|
||||||
running_from_gui = with_gui;
|
running_from_gui = with_gui;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
|
|
||||||
|
|
@ -538,7 +538,6 @@ again:
|
||||||
void
|
void
|
||||||
Graph::setup_thread_local_variables ()
|
Graph::setup_thread_local_variables ()
|
||||||
{
|
{
|
||||||
Temporal::set_thread_sample_rate (AudioEngine::instance()->sample_rate());
|
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#include <glibmm/threads.h>
|
#include <glibmm/threads.h>
|
||||||
|
|
||||||
#include "temporal/superclock.h"
|
#include "temporal/tempo.h"
|
||||||
|
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
#include "ardour/auditioner.h"
|
#include "ardour/auditioner.h"
|
||||||
|
|
@ -72,7 +72,7 @@ using namespace std;
|
||||||
void
|
void
|
||||||
Session::setup_thread_local_variables ()
|
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.
|
/** 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
|
void
|
||||||
ControlProtocol::event_loop_precall ()
|
ControlProtocol::event_loop_precall ()
|
||||||
{
|
{
|
||||||
Temporal::set_thread_sample_rate (session->sample_rate());
|
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue