diff options
author | Robin Gareus <robin@gareus.org> | 2019-09-09 18:48:16 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-09-09 18:48:16 +0200 |
commit | 4abb907a8278c8ab05cd82cb11dfe5a22abc28c5 (patch) | |
tree | f37a6cc880813c03a131f7719dade3f6fcff5e09 /libs/ardour | |
parent | 07b685c37133376e3ffdede1ca23d83d462445cf (diff) |
Use ProcessThread::init () to set up denormal protection
Modifying the MXCSR register only affects the current thread.
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/ardour/process_thread.h | 2 | ||||
-rw-r--r-- | libs/ardour/process_thread.cc | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index d4cda5b472..a4ca646d4b 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -37,7 +37,7 @@ public: ProcessThread (); ~ProcessThread (); - static void init(); + void init(); void get_buffers (); void drop_buffers (); diff --git a/libs/ardour/process_thread.cc b/libs/ardour/process_thread.cc index 0cf4bc6f39..196b884100 100644 --- a/libs/ardour/process_thread.cc +++ b/libs/ardour/process_thread.cc @@ -20,6 +20,7 @@ #include <iostream> +#include "ardour/ardour.h" #include "ardour/buffer.h" #include "ardour/buffer_manager.h" #include "ardour/buffer_set.h" @@ -41,10 +42,13 @@ Glib::Threads::Private<ThreadBuffers> ProcessThread::_private_thread_buffers (re void ProcessThread::init () { + /* denormal protection is per thread */ + ARDOUR::setup_fpu (); } ProcessThread::ProcessThread () { + init (); } ProcessThread::~ProcessThread () |