use Temporal::set_thread_sample_rate() rather than explicit assignment
This commit is contained in:
parent
62ea0fc24c
commit
ae01dafcce
@ -3117,11 +3117,9 @@ ARDOUR_UI::setup_toplevel_window (Gtk::Window& window, const string& name, void*
|
|||||||
void
|
void
|
||||||
ARDOUR_UI::event_loop_precall ()
|
ARDOUR_UI::event_loop_precall ()
|
||||||
{
|
{
|
||||||
std::cout << "ev precall\n";
|
|
||||||
|
|
||||||
if (_session) {
|
if (_session) {
|
||||||
Temporal::_thread_sample_rate = _session->sample_rate ();
|
Temporal::set_thread_sample_rate (_session->sample_rate ());
|
||||||
} else {
|
} else {
|
||||||
Temporal::_thread_sample_rate = 44100;
|
Temporal::set_thread_sample_rate (44100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1142,7 +1142,7 @@ Editor::_import_thread (void *arg)
|
|||||||
void *
|
void *
|
||||||
Editor::import_thread ()
|
Editor::import_thread ()
|
||||||
{
|
{
|
||||||
Temporal::_thread_sample_rate = _session->sample_rate();
|
Temporal::set_thread_sample_rate (_session->sample_rate());
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
_session->import_files (import_status);
|
_session->import_files (import_status);
|
||||||
|
@ -288,6 +288,10 @@ 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 ();
|
||||||
|
|
||||||
/* This is for JACK, where the latency callback arrives in sync with
|
/* This is for JACK, where the latency callback arrives in sync with
|
||||||
* port registration (usually while ardour holds the process-lock
|
* port registration (usually while ardour holds the process-lock
|
||||||
* or with _adding_routes_in_progress or _route_deletion_in_progress set,
|
* or with _adding_routes_in_progress or _route_deletion_in_progress set,
|
||||||
@ -1429,7 +1433,7 @@ 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::_thread_sample_rate = 44100; /* will change later as appropriate */
|
Temporal::set_thread_sample_rate (44100); /* will change later as appropriate */
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
|
|
||||||
if (arg) {
|
if (arg) {
|
||||||
|
@ -23,6 +23,9 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "pbd/compose.h"
|
#include "pbd/compose.h"
|
||||||
#include "pbd/debug_rt_alloc.h"
|
#include "pbd/debug_rt_alloc.h"
|
||||||
#include "pbd/pthread_utils.h"
|
#include "pbd/pthread_utils.h"
|
||||||
@ -470,6 +473,7 @@ Graph::helper_thread ()
|
|||||||
pt->get_buffers ();
|
pt->get_buffers ();
|
||||||
|
|
||||||
while (!g_atomic_int_get (&_terminate)) {
|
while (!g_atomic_int_get (&_terminate)) {
|
||||||
|
// printf ("HELPER %s %ld\n", pthread_name(), syscall (SYS_gettid)); fflush (stdout);
|
||||||
setup_thread_local_variables ();
|
setup_thread_local_variables ();
|
||||||
run_one ();
|
run_one ();
|
||||||
}
|
}
|
||||||
@ -535,7 +539,7 @@ again:
|
|||||||
void
|
void
|
||||||
Graph::setup_thread_local_variables ()
|
Graph::setup_thread_local_variables ()
|
||||||
{
|
{
|
||||||
Temporal::_thread_sample_rate = _session.sample_rate ();
|
Temporal::set_thread_sample_rate (_session.sample_rate ());
|
||||||
Temporal::TempoMap::fetch ();
|
Temporal::TempoMap::fetch ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ using namespace std;
|
|||||||
void
|
void
|
||||||
Session::setup_thread_local_variables ()
|
Session::setup_thread_local_variables ()
|
||||||
{
|
{
|
||||||
Temporal::_thread_sample_rate = sample_rate();
|
Temporal::set_thread_sample_rate (sample_rate());
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user