diff options
author | Carl Hetherington <carl@carlh.net> | 2012-01-22 12:28:49 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-01-22 12:28:49 +0000 |
commit | e317386c5cde5741a8279bf480240293720d6788 (patch) | |
tree | b2a46c67c910e079a5bf94684ac108fc90a4a511 /libs/ardour/graph.cc | |
parent | 9080c672a531a05b9b2f72a85faa5725457653de (diff) |
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
Diffstat (limited to 'libs/ardour/graph.cc')
-rw-r--r-- | libs/ardour/graph.cc | 23 |
1 files changed, 3 insertions, 20 deletions
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); } |