From e317386c5cde5741a8279bf480240293720d6788 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 22 Jan 2012 12:28:49 +0000 Subject: For now, only use the multi-threaded process code if we are using >1 processor for DSP; this involves making the DSP use setting only take effect on a restart of Ardour. git-svn-id: svn://localhost/ardour2/branches/3.0@11302 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/graph.cc | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'libs/ardour/graph.cc') diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc index 5b435884d4..c38106506e 100644 --- a/libs/ardour/graph.cc +++ b/libs/ardour/graph.cc @@ -77,28 +77,21 @@ Graph::Graph (Session & session) reset_thread_list (); - Config->ParameterChanged.connect_same_thread (processor_usage_connection, boost::bind (&Graph::parameter_changed, this, _1)); - #ifdef DEBUG_RT_ALLOC graph = this; pbd_alloc_allowed = &::alloc_allowed; #endif } -void -Graph::parameter_changed (std::string param) -{ - if (param == X_("processor-usage")) { - reset_thread_list (); - } -} - /** Set up threads for running the graph */ void Graph::reset_thread_list () { uint32_t num_threads = how_many_dsp_threads (); + /* For now, we shouldn't be using the graph code if we only have 1 DSP thread */ + assert (num_threads > 1); + /* don't bother doing anything here if we already have the right number of threads. */ @@ -114,16 +107,6 @@ Graph::reset_thread_list () drop_threads (); } -#if 0 - /* XXX this only makes sense when we can use just the AudioEngine thread - and still keep the graph current with the route list - */ - if (num_threads <= 1) { - /* no point creating 1 thread - the AudioEngine already gives us one - */ - return; - } -#endif if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::main_thread, this), &a_thread, 100000) == 0) { _thread_list.push_back (a_thread); } -- cgit v1.2.3