Browse Source

Implement discovery for ':all' used in last commit

tags/1.9.7
falkTX 9 years ago
parent
commit
9dfa37c838
1 changed files with 36 additions and 1 deletions
  1. +36
    -1
      source/discovery/carla-discovery.cpp

+ 36
- 1
source/discovery/carla-discovery.cpp View File

@@ -1,6 +1,6 @@
/*
* Carla Plugin discovery
* Copyright (C) 2011-2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2011-2016 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -36,6 +36,9 @@
#include "CarlaLv2Utils.hpp"
#include "CarlaVstUtils.hpp"

// need to include this before linuxsampler
#include "CarlaUtils.cpp"

#ifdef HAVE_FLUIDSYNTH
# include <fluidsynth.h>
#endif
@@ -402,6 +405,32 @@ private:

// ------------------------------ Plugin Checks -----------------------------

static void do_cached_check(const PluginType type)
{
const char* const plugPath = (type == PLUGIN_LV2) ? std::getenv("LV2_PATH") : nullptr;
const uint count = carla_get_cached_plugin_count(type, plugPath);

for (uint i=0; i<count; ++i)
{
const CarlaCachedPluginInfo* pinfo(carla_get_cached_plugin_info(type, i));
CARLA_SAFE_ASSERT_CONTINUE(pinfo != nullptr);

DISCOVERY_OUT("init", "-----------");
DISCOVERY_OUT("build", BINARY_NATIVE);
DISCOVERY_OUT("hints", pinfo->hints);
DISCOVERY_OUT("name", pinfo->name);
DISCOVERY_OUT("maker", pinfo->maker);
DISCOVERY_OUT("label", pinfo->label);
DISCOVERY_OUT("audio.ins", pinfo->audioIns);
DISCOVERY_OUT("audio.outs", pinfo->audioOuts);
DISCOVERY_OUT("midi.ins", pinfo->midiIns);
DISCOVERY_OUT("midi.outs", pinfo->midiOuts);
DISCOVERY_OUT("parameters.ins", pinfo->parameterIns);
DISCOVERY_OUT("parameters.outs", pinfo->parameterOuts);
DISCOVERY_OUT("end", "------------");
}
}

static void do_ladspa_check(lib_t& libHandle, const char* const filename, const bool doInit)
{
LADSPA_Descriptor_Function descFn = lib_symbol<LADSPA_Descriptor_Function>(libHandle, "ladspa_descriptor");
@@ -1723,6 +1752,12 @@ int main(int argc, char* argv[])
}
}

if (std::strcmp(filename, ":all") == 0)
{
do_cached_check(type);
return 0;
}

switch (type)
{
case PLUGIN_LADSPA:


Loading…
Cancel
Save