From ff525995bc0673cb9675646f61a624db759d1047 Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 6 Feb 2014 12:00:35 +0000 Subject: [PATCH] Don't use juce for handling VSTs in linux, it's broken Use our own code instead --- source/backend/plugin/VstPlugin.cpp | 8 +++++++- source/modules/juce_audio_processors/AppConfig.h | 8 ++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/source/backend/plugin/VstPlugin.cpp b/source/backend/plugin/VstPlugin.cpp index f0f3765fb..06147cc34 100644 --- a/source/backend/plugin/VstPlugin.cpp +++ b/source/backend/plugin/VstPlugin.cpp @@ -18,6 +18,12 @@ #include "CarlaPluginInternal.hpp" #include "CarlaEngine.hpp" +#if defined(CARLA_OS_LINUX) || defined(VESTIGE_HEADER) +# define USE_JUCE_FOR_VST 0 +#else +# define USE_JUCE_FOR_VST 1 +#endif + #ifdef WANT_VST #include "CarlaVstUtils.hpp" @@ -2456,7 +2462,7 @@ CarlaPlugin* CarlaPlugin::newVST(const Initializer& init) carla_debug("CarlaPlugin::newVST({%p, \"%s\", \"%s\"})", init.engine, init.filename, init.name); #ifdef WANT_VST -# if 1 //defined(HAVE_JUCE) && ! defined(VESTIGE_HEADER) +# if defined(HAVE_JUCE) && USE_JUCE_FOR_VST return newJuce(init, "VST"); # else VstPlugin* const plugin(new VstPlugin(init.engine, init.id)); diff --git a/source/modules/juce_audio_processors/AppConfig.h b/source/modules/juce_audio_processors/AppConfig.h index 25abb025e..23ceaa05f 100755 --- a/source/modules/juce_audio_processors/AppConfig.h +++ b/source/modules/juce_audio_processors/AppConfig.h @@ -19,13 +19,17 @@ @see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU */ -#define JUCE_PLUGINHOST_VST 1 +#ifndef VESTIGE_HEADER +# define JUCE_PLUGINHOST_VST 1 +#else +# define JUCE_PLUGINHOST_VST 0 +#endif /** Config: JUCE_PLUGINHOST_VST3 Enables the VST3 audio plugin hosting classes. This requires the Steinberg VST3 SDK to be installed on your machine. - @see VSTPluginFormat, VVST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU + @see VSTPluginFormat, VST3PluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST, JUCE_PLUGINHOST_AU */ #if defined(JUCE_WINDOW) || defined(JUCE_MAC) # define JUCE_PLUGINHOST_VST3 1