summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-09-09 18:48:16 +0200
committerRobin Gareus <robin@gareus.org>2019-09-09 18:48:16 +0200
commit4abb907a8278c8ab05cd82cb11dfe5a22abc28c5 (patch)
treef37a6cc880813c03a131f7719dade3f6fcff5e09 /libs/ardour
parent07b685c37133376e3ffdede1ca23d83d462445cf (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.h2
-rw-r--r--libs/ardour/process_thread.cc4
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 ()