Browse Source

carla-plugin fixes

tags/1.9.4
falkTX 10 years ago
parent
commit
6fe2ed353e
4 changed files with 16 additions and 21 deletions
  1. +9
    -0
      source/backend/engine/CarlaEngineNative.cpp
  2. +3
    -0
      source/carla-plugin
  3. +2
    -9
      source/plugin/carla-native-lv2-export.cpp
  4. +2
    -12
      source/plugin/carla-native-lv2.cpp

+ 9
- 0
source/backend/engine/CarlaEngineNative.cpp View File

@@ -465,6 +465,15 @@ protected:
if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId))
plugin->prepareForSave();
}
else if (std::strcmp(msg, "reset_parameters") == 0)
{
uint32_t pluginId;

CARLA_SAFE_ASSERT_RETURN(readNextLineAsUInt(pluginId), true);

if (CarlaPlugin* const plugin = fEngine->getPlugin(pluginId))
plugin->resetParameters();
}
else if (std::strcmp(msg, "randomize_parameters") == 0)
{
uint32_t pluginId;


+ 3
- 0
source/carla-plugin View File

@@ -487,6 +487,9 @@ class PluginHost(object):
def prepare_for_save(self, pluginId):
gCarla.gui.send(["prepare_for_save", pluginId])

def reset_parameters(self, pluginId):
gCarla.gui.send(["reset_parameters", pluginId])

def randomize_parameters(self, pluginId):
gCarla.gui.send(["randomize_parameters", pluginId])



+ 2
- 9
source/plugin/carla-native-lv2-export.cpp View File

@@ -119,11 +119,7 @@ static void writeManifestFile(PluginListManager& plm)
const NativePluginDescriptor* const& pluginDesc(it.getValue());
const String label(pluginDesc->label);

if (label == "carla")
text += "<http://kxstudio.sf.net/carla>\n";
else
text += "<http://kxstudio.sf.net/carla/plugins/" + label + ">\n";

text += "<http://kxstudio.sf.net/carla/plugins/" + label + ">\n";
text += " a lv2:Plugin ;\n";
text += " lv2:binary <carla-native" PLUGIN_EXT "> ;\n";
text += " rdfs:seeAlso <" + label + ".ttl> .\n";
@@ -210,10 +206,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc)
// -------------------------------------------------------------------
// Plugin URI

if (pluginLabel == "carla")
text += "<http://kxstudio.sf.net/carla>\n";
else
text += "<http://kxstudio.sf.net/carla/plugins/" + pluginLabel + ">\n";
text += "<http://kxstudio.sf.net/carla/plugins/" + pluginLabel + ">\n";

// -------------------------------------------------------------------
// Category


+ 2
- 12
source/plugin/carla-native-lv2.cpp View File

@@ -1183,8 +1183,6 @@ static LV2_Handle lv2_instantiate(const LV2_Descriptor* lv2Descriptor, double sa

if (std::strncmp(lv2Descriptor->URI, "http://kxstudio.sf.net/carla/plugins/", 37) == 0)
pluginLabel = lv2Descriptor->URI+37;
else if (std::strcmp(lv2Descriptor->URI, "http://kxstudio.sf.net/carla") == 0)
pluginLabel = "carla";

if (pluginLabel == nullptr)
{
@@ -1404,16 +1402,8 @@ const LV2_Descriptor* lv2_descriptor(uint32_t index)
const NativePluginDescriptor* const pluginDesc(plm.descs.getAt(index));

CarlaString tmpURI;

if (std::strcmp(pluginDesc->label, "carla") == 0)
{
tmpURI = "http://kxstudio.sf.net/carla";
}
else
{
tmpURI = "http://kxstudio.sf.net/carla/plugins/";
tmpURI += pluginDesc->label;
}
tmpURI = "http://kxstudio.sf.net/carla/plugins/";
tmpURI += pluginDesc->label;

carla_debug("lv2_descriptor(%i) - not found, allocating new with uri \"%s\"", index, (const char*)tmpURI);



Loading…
Cancel
Save