Browse Source

jsfx: use fx.desc as a better plugin name

pull/1503/head
Jean Pierre Cimalando 3 years ago
parent
commit
367f6ee4b4
3 changed files with 4 additions and 6 deletions
  1. +1
    -2
      source/backend/plugin/CarlaPluginJSFX.cpp
  2. +2
    -1
      source/backend/utils/CachedPlugins.cpp
  3. +1
    -3
      source/discovery/carla-discovery.cpp

+ 1
- 2
source/backend/plugin/CarlaPluginJSFX.cpp View File

@@ -931,8 +931,7 @@ public:
}
else
{
String baseName = File(fFilename).getFileNameWithoutExtension();
pData->name = pData->engine->getUniquePluginName(baseName.toRawUTF8());
pData->name = carla_strdup(fEffect->desc);
}

pData->filename = carla_strdup(fFilename.c_str());


+ 2
- 1
source/backend/utils/CachedPlugins.cpp View File

@@ -673,7 +673,6 @@ static const CarlaCachedPluginInfo* get_cached_plugin_jsfx(const CarlaJsfxUnit&
static CarlaString name, label;

const water::File unitFilePath = unit.getFilePath();
name = unitFilePath.getFileNameWithoutExtension().toRawUTF8();
label = unit.getFileId().toRawUTF8();

{
@@ -692,6 +691,8 @@ static const CarlaCachedPluginInfo* get_cached_plugin_jsfx(const CarlaJsfxUnit&

info.valid = true;

name = effect.desc;

// NOTE: count can be -1 in case of "none"
info.audioIns = (effect.numInputs == -1) ? 0 : (uint32_t)effect.numInputs;
info.audioOuts = (effect.numOutputs == -1) ? 0 : (uint32_t)effect.numOutputs;


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

@@ -1704,8 +1704,6 @@ static void do_jsfx_check(const char* const filename, bool doInit)
return;
}

water::String baseName = water::File(filename).getFileNameWithoutExtension();

// NOTE: count can be -1 in case of "none"
uint32_t audioIns = (effect.numInputs == -1) ? 0 : (uint32_t)effect.numInputs;
uint32_t audioOuts = (effect.numOutputs == -1) ? 0 : (uint32_t)effect.numOutputs;
@@ -1723,7 +1721,7 @@ static void do_jsfx_check(const char* const filename, bool doInit)
DISCOVERY_OUT("init", "-----------");
DISCOVERY_OUT("build", BINARY_NATIVE);
DISCOVERY_OUT("hints", hints);
DISCOVERY_OUT("name", baseName.toRawUTF8());
DISCOVERY_OUT("name", effect.desc);
DISCOVERY_OUT("label", filename);
DISCOVERY_OUT("audio.ins", audioIns);
DISCOVERY_OUT("audio.outs", audioOuts);


Loading…
Cancel
Save