Engage thread-safe fftw planner in libardour
authorRobin Gareus <robin@gareus.org>
Tue, 10 Sep 2019 01:06:21 +0000 (03:06 +0200)
committerRobin Gareus <robin@gareus.org>
Tue, 10 Sep 2019 01:06:21 +0000 (03:06 +0200)
This way initialization happens constently, and independent from the GUI,
for session-utils, lua, headless..

libs/ardour/globals.cc
libs/ardour/wscript
libs/audiographer/wscript

index 7233370a1184c681c91900ed0258dcdb682f51d2..fa7467abe0a50b3f195ed5cd348d11407a3ef53e 100644 (file)
 #include <windows.h> // for LARGE_INTEGER
 #endif
 
+#ifdef HAVE_FFTW35F
+#include <fftw3.h>
+#endif
+
 #ifdef WINDOWS_VST_SUPPORT
 #include <fst.h>
 #endif
@@ -452,6 +456,10 @@ ARDOUR::init (bool use_windows_vst, bool try_optimization, const char* localedir
        }
 #endif
 
+#ifdef HAVE_FFTW35F
+       fftwf_make_planner_thread_safe ();
+#endif
+
        if (!PBD::init()) return false;
 
 #if ENABLE_NLS
index c952d6aa0c7d28858b9c1c4e6623366bbbca75ef..9e3283a173b032d40c4e485430a0d4190e0a21e2 100644 (file)
@@ -329,6 +329,9 @@ def configure(conf):
     autowaf.check_pkg(conf, 'libcurl', uselib_store='CURL',
                       atleast_version='7.0.0')
 
+    autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW35F',
+                      atleast_version='3.3.5', mandatory=False)
+
     # controls whether we actually use it in preference to soundtouch
     # Note: as of 2104, soundtouch (WSOLA) has been out-of-use for years.
     conf.define('USE_RUBBERBAND', 1)
index f6e7f7cd8391473ac009515ac28e74d5ef5c4fa5..7c04604906d2194751c1e64614a8c051067a355f 100644 (file)
@@ -37,7 +37,6 @@ def configure(conf):
     autowaf.check_pkg(conf, 'samplerate', uselib_store='SAMPLERATE', atleast_version='0.1.7', mandatory=False)
     autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=False)
     autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
-    autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW35F', atleast_version='3.3.5', mandatory=False)
 
     # Boost headers
     autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')