diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-24 14:13:45 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-06-24 14:13:45 +0000 |
commit | 0f5bdd666fa66bd279f8629a670d8058780a613d (patch) | |
tree | 2456f101d56c9d2f091631293f8b85645389f031 /libs/ardour/ardour | |
parent | fe229a830e0164e56d3aceaf3d539e4148f322a6 (diff) |
use JACK thread creation functions to create process-graph threads; provide GUI control over number of threads-relative-to-number-of-CPUS
git-svn-id: svn://localhost/ardour2/branches/3.0@7296 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r-- | libs/ardour/ardour/audioengine.h | 13 | ||||
-rw-r--r-- | libs/ardour/ardour/graph.h | 2 | ||||
-rw-r--r-- | libs/ardour/ardour/rc_configuration_vars.h | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index 5e2657c56c..9a0104b8fe 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -245,6 +245,8 @@ _ the regular process() call to session->process() is not made. static AudioEngine* instance() { return _instance; } void died (); + pthread_t create_process_thread (boost::function<void()>, size_t stacksize); + private: static AudioEngine* _instance; @@ -316,6 +318,17 @@ _ the regular process() call to session->process() is not made. static gint m_meter_exit; ProcessThread* _main_thread; + + struct ThreadData { + AudioEngine* engine; + boost::function<void()> f; + size_t stacksize; + + ThreadData (AudioEngine* ae, boost::function<void()> fp, size_t stacksz) + : engine (ae) , f (fp) , stacksize (stacksz) {} + }; + + static void* _start_process_thread (void*); }; } // namespace ARDOUR diff --git a/libs/ardour/ardour/graph.h b/libs/ardour/ardour/graph.h index 6226ed5602..f38ef12721 100644 --- a/libs/ardour/ardour/graph.h +++ b/libs/ardour/ardour/graph.h @@ -85,7 +85,7 @@ class Graph : public SessionHandleRef virtual void session_going_away (); private: - std::list<Glib::Thread *> _thread_list; + std::list<pthread_t> _thread_list; volatile bool _quit_threads; node_list_t _nodes_rt[2]; diff --git a/libs/ardour/ardour/rc_configuration_vars.h b/libs/ardour/ardour/rc_configuration_vars.h index 92397c149f..e98f396b95 100644 --- a/libs/ardour/ardour/rc_configuration_vars.h +++ b/libs/ardour/ardour/rc_configuration_vars.h @@ -153,6 +153,7 @@ CONFIG_VARIABLE (bool, show_waveforms_while_recording, "show-waveforms-while-rec CONFIG_VARIABLE (WaveformScale, waveform_scale, "waveform-scale", Linear) CONFIG_VARIABLE (WaveformShape, waveform_shape, "waveform-shape", Traditional) CONFIG_VARIABLE (bool, allow_special_bus_removal, "allow-special-bus-removal", false) +CONFIG_VARIABLE (int32_t, processor_usage, "processor-usage", -1) /* denormal management */ |