From 3afa2034081912124912645a71f3ed3c06f4095d Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Jun 2020 14:42:36 +0100 Subject: [PATCH] Fix JACK internal client build Signed-off-by: falkTX --- source/backend/engine/CarlaEngineJack.cpp | 24 ++++++++--------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/source/backend/engine/CarlaEngineJack.cpp b/source/backend/engine/CarlaEngineJack.cpp index 5043f1145..1619954cf 100644 --- a/source/backend/engine/CarlaEngineJack.cpp +++ b/source/backend/engine/CarlaEngineJack.cpp @@ -4368,7 +4368,6 @@ void jack_finish(void *arg); #ifdef CARLA_OS_UNIX # include "ThreadSafeFFTW.hpp" -static ThreadSafeFFTW sThreadSafeFFTW; #endif // ----------------------------------------------------------------------- @@ -4378,6 +4377,10 @@ int jack_initialize(jack_client_t* const client, const char* const load_init) { CARLA_BACKEND_USE_NAMESPACE +#ifdef CARLA_OS_UNIX + static const ThreadSafeFFTW sThreadSafeFFTW; +#endif + EngineProcessMode mode; if (load_init != nullptr && std::strcmp(load_init, "rack") == 0) mode = ENGINE_PROCESS_MODE_CONTINUOUS_RACK; @@ -4405,20 +4408,13 @@ int jack_initialize(jack_client_t* const client, const char* const load_init) engine->setOption(ENGINE_OPTION_PATH_RESOURCES, 0, "/usr/share/resources"); if (engine->initInternal(client)) - { -#ifdef CARLA_OS_UNIX - sThreadSafeFFTW.init(); -#endif return 0; - } - else - { - delete engine; + + delete engine; #ifdef USING_JUCE - juce::shutdownJuce_GUI(); + juce::shutdownJuce_GUI(); #endif - return 1; - } + return 1; } CARLA_EXPORT @@ -4429,10 +4425,6 @@ void jack_finish(void *arg) CarlaEngineJack* const engine = (CarlaEngineJack*)arg;; CARLA_SAFE_ASSERT_RETURN(engine != nullptr,); -#ifdef CARLA_OS_UNIX - const ThreadSafeFFTW::Deinitializer tsfftwde(sThreadSafeFFTW); -#endif - engine->setAboutToClose(); engine->removeAllPlugins(); engine->close();