Browse Source

Only use juce_audio_processors for discovery in mac and windows

tags/1.9.4
falkTX 11 years ago
parent
commit
2b01dd9b33
1 changed files with 10 additions and 49 deletions
  1. +10
    -49
      source/discovery/carla-discovery.cpp

+ 10
- 49
source/discovery/carla-discovery.cpp View File

@@ -15,17 +15,18 @@
* For a full copy of the GNU General Public License see the doc/GPL.txt file. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
*/ */


// if using juce, don't build UI stuff
#define JUCE_PLUGIN_HOST_NO_UI

#include "CarlaBackendUtils.hpp" #include "CarlaBackendUtils.hpp"
#include "CarlaLibUtils.hpp" #include "CarlaLibUtils.hpp"
#include "CarlaMathUtils.hpp" #include "CarlaMathUtils.hpp"
#include "CarlaMIDI.h" #include "CarlaMIDI.h"


#ifdef HAVE_JUCE #ifdef HAVE_JUCE
# include "juce_audio_processors.h"
# if defined(CARLA_OS_MAC) || defined(CARLA_OS_WIN)
# define WANT_JUCE_PROCESSORS
# include "juce_audio_processors.h"
# endif
#else #else
// our csound code needs juce
# undef WANT_CSOUND # undef WANT_CSOUND
#endif #endif


@@ -1452,7 +1453,7 @@ static void do_vst_check(void*& libHandle, const bool init)
#endif #endif
} }


#ifdef HAVE_JUCE
#ifdef WANT_JUCE_PROCESSORS
static void do_juce_check(const char* const filename, const char* const stype, const bool init) static void do_juce_check(const char* const filename, const char* const stype, const bool init)
{ {
using namespace juce; using namespace juce;
@@ -1470,14 +1471,14 @@ static void do_juce_check(const char* const filename, const char* const stype, c
DISCOVERY_OUT("error", "LADSPA support not available"); DISCOVERY_OUT("error", "LADSPA support not available");
#endif #endif
} }
/*else if (std::strcmp(stype, "VST") == 0)
else if (std::strcmp(stype, "VST") == 0)
{ {
#if defined(WANT_VST) && JUCE_PLUGINHOST_VST #if defined(WANT_VST) && JUCE_PLUGINHOST_VST
pluginFormat = new VSTPluginFormat(); pluginFormat = new VSTPluginFormat();
#else #else
DISCOVERY_OUT("error", "VST support not available"); DISCOVERY_OUT("error", "VST support not available");
#endif #endif
}*/
}
else if (std::strcmp(stype, "VST3") == 0) else if (std::strcmp(stype, "VST3") == 0)
{ {
#if defined(WANT_VST3) && JUCE_PLUGINHOST_VST3 #if defined(WANT_VST3) && JUCE_PLUGINHOST_VST3
@@ -1901,14 +1902,14 @@ int main(int argc, char* argv[])
do_vst_check(handle, doInit); do_vst_check(handle, doInit);
break; break;
case PLUGIN_VST3: case PLUGIN_VST3:
#ifdef HAVE_JUCE
#ifdef WANT_JUCE_PROCESSORS
do_juce_check(filename, "VST3", doInit); do_juce_check(filename, "VST3", doInit);
#else #else
DISCOVERY_OUT("error", "VST3 support not available"); DISCOVERY_OUT("error", "VST3 support not available");
#endif #endif
break; break;
case PLUGIN_AU: case PLUGIN_AU:
#ifdef HAVE_JUCE
#ifdef WANT_JUCE_PROCESSORS
do_juce_check(filename, "AU", doInit); do_juce_check(filename, "AU", doInit);
#else #else
DISCOVERY_OUT("error", "AU support not available"); DISCOVERY_OUT("error", "AU support not available");
@@ -1943,44 +1944,4 @@ int main(int argc, char* argv[])
# include "CarlaDssiUtils.cpp" # include "CarlaDssiUtils.cpp"
#endif #endif


#ifdef HAVE_JUCE
// --------------------------------------------------------------------------
// we want juce_audio_processors but without UI code
// this is copied from juce_audio_processors.cpp

#include "juce_core/native/juce_BasicNativeHeaders.h"

namespace juce
{

static inline
bool arrayContainsPlugin(const OwnedArray<PluginDescription>& list, const PluginDescription& desc)
{
for (int i = list.size(); --i >= 0;)
{
if (list.getUnchecked(i)->isDuplicateOf(desc))
return true;
}
return false;
}

#include "juce_audio_processors/format/juce_AudioPluginFormat.cpp"
#include "juce_audio_processors/processors/juce_AudioProcessor.cpp"
#include "juce_audio_processors/processors/juce_PluginDescription.cpp"

#ifdef WANT_LADSPA
# include "juce_audio_processors/format_types/juce_LADSPAPluginFormat.cpp"
#endif
#if 0 //def WANT_VST
# include "juce_audio_processors/format_types/juce_VSTPluginFormat.cpp"
#endif
#ifdef WANT_VST3
# include "juce_audio_processors/format_types/juce_VST3PluginFormat.cpp"
#endif
#ifdef WANT_AU
# include "juce_audio_processors/format_types/juce_AudioUnitPluginFormat.mm"
#endif
}
#endif

// -------------------------------------------------------------------------- // --------------------------------------------------------------------------

Loading…
Cancel
Save