Browse Source

Fix some discovery issues

tags/1.9.5
falkTX 10 years ago
parent
commit
8885e638c4
2 changed files with 22 additions and 12 deletions
  1. +1
    -1
      source/carla_database.py
  2. +21
    -11
      source/discovery/carla-discovery.cpp

+ 1
- 1
source/carla_database.py View File

@@ -107,7 +107,7 @@ def findMacVSTBundles(bundlePath, isVST3):
bundles = []

for root, dirs, files in os.walk(bundlePath, followlinks=True):
if root == bundlePath: continue
#if root == bundlePath: continue # FIXME
for name in [name for name in dirs if name.lower().endswith(".vst3" if isVST3 else ".vst")]:
bundles.append(os.path.join(root, name))



+ 21
- 11
source/discovery/carla-discovery.cpp View File

@@ -1375,16 +1375,18 @@ static void do_vst_check(void*& libHandle, const bool doInit)
#endif // ! CARLA_OS_MAC

#ifdef USE_JUCE_PROCESSORS
static void do_juce_check(const char* const filename, const char* const stype, const bool doInit)
static void do_juce_check(const char* const filename_, const char* const stype, const bool doInit)
{
CARLA_SAFE_ASSERT_RETURN(stype != nullptr && stype[0] != 0,) // FIXME
carla_debug("do_juce_check(%s, %s, %s)", filename_, stype, bool2str(doInit));

using namespace juce;

ScopedPointer<AudioPluginFormat> pluginFormat;
juce::String filename(File(filename_).getFullPathName());

if (stype == nullptr)
return;
ScopedPointer<AudioPluginFormat> pluginFormat;

else if (std::strcmp(stype, "VST") == 0)
/* */ if (std::strcmp(stype, "VST") == 0)
{
#if JUCE_PLUGINHOST_VST
pluginFormat = new VSTPluginFormat();
@@ -1415,13 +1417,21 @@ static void do_juce_check(const char* const filename, const char* const stype, c
return;
}

CARLA_SAFE_ASSERT_RETURN(pluginFormat->fileMightContainThisPluginType(filename),);

OwnedArray<PluginDescription> results;
pluginFormat->findAllTypesForFile(results, filename);

if (results.size() == 0)
{
DISCOVERY_OUT("error", "No plugins found");
return;
}

for (PluginDescription **it = results.begin(), **end = results.end(); it != end; ++it)
{
static int iv=0;
carla_stderr2("LOOKING FOR PLUGIN %i", iv++);
carla_debug("LOOKING FOR PLUGIN %i", iv++);
PluginDescription* const desc(*it);

uint hints = 0x0;
@@ -1598,17 +1608,17 @@ int main(int argc, char* argv[])
const char* const filename = argv[2];
const PluginType type = getPluginTypeFromString(stype);

CarlaString filenameStr(filename);
filenameStr.toLower();
CarlaString filenameCheck(filename);
filenameCheck.toLower();

if (type != PLUGIN_GIG && type != PLUGIN_SF2 && type != PLUGIN_SFZ)
{
if (filenameStr.contains("fluidsynth", true))
if (filenameCheck.contains("fluidsynth", true))
{
DISCOVERY_OUT("info", "skipping fluidsynth based plugin");
return 0;
}
if (filenameStr.contains("linuxsampler", true) || filenameStr.endsWith("ls16.so"))
if (filenameCheck.contains("linuxsampler", true) || filenameCheck.endsWith("ls16.so"))
{
DISCOVERY_OUT("info", "skipping linuxsampler based plugin");
return 0;
@@ -1642,7 +1652,7 @@ int main(int argc, char* argv[])
}

// never do init for dssi-vst, takes too long and it's crashy
bool doInit = ! filenameStr.contains("dssi-vst", true);
bool doInit = ! filenameCheck.contains("dssi-vst", true);

if (doInit && getenv("CARLA_DISCOVERY_NO_PROCESSING_CHECKS") != nullptr)
doInit = false;


Loading…
Cancel
Save