From 38b36d2ea5b7aba5a10ff25891d4df5c6ac51a68 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 10 Sep 2019 03:06:21 +0200 Subject: [PATCH] Engage thread-safe fftw planner in libardour This way initialization happens constently, and independent from the GUI, for session-utils, lua, headless.. --- libs/ardour/globals.cc | 8 ++++++++ libs/ardour/wscript | 3 +++ libs/audiographer/wscript | 1 - 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc index 7233370a11..fa7467abe0 100644 --- a/libs/ardour/globals.cc +++ b/libs/ardour/globals.cc @@ -53,6 +53,10 @@ #include // for LARGE_INTEGER #endif +#ifdef HAVE_FFTW35F +#include +#endif + #ifdef WINDOWS_VST_SUPPORT #include #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 diff --git a/libs/ardour/wscript b/libs/ardour/wscript index c952d6aa0c..9e3283a173 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -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) diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript index f6e7f7cd83..7c04604906 100644 --- a/libs/audiographer/wscript +++ b/libs/audiographer/wscript @@ -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')