Browse Source

Fix lv2 export preset validation

Signed-off-by: falkTX <falktx@falktx.com>
tags/2021-01-15
falkTX 3 years ago
parent
commit
d6465b3eed
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 32 additions and 0 deletions
  1. +16
    -0
      libs/juce-current/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp
  2. +16
    -0
      libs/juce-legacy/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp

+ 16
- 0
libs/juce-current/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp View File

@@ -371,6 +371,22 @@ static const String makePresetsFile (AudioProcessor* const filter)
text += "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n";
text += "\n";

#if JucePlugin_WantsLV2State
#if JucePlugin_WantsLV2StateString
text += "<" JUCE_LV2_STATE_STRING_URI ">\n";
text += " a owl:DatatypeProperty ;\n";
text += " rdfs:label \"Plugin state as string\" ;\n";
text += " rdfs:domain state:State ;\n";
text += " rdfs:range xsd:string .\n";
#else
text += "<" JUCE_LV2_STATE_BINARY_URI ">\n";
text += " a owl:DatatypeProperty ;\n";
text += " rdfs:label \"Plugin state as base64-encoded string\" ;\n";
text += " rdfs:domain state:State ;\n";
text += " rdfs:range xsd:base64Binary .\n";
#endif
#endif

// Presets
const int numPrograms = filter->getNumPrograms();
const String presetSeparator(pluginURI.contains("#") ? ":" : "#");


+ 16
- 0
libs/juce-legacy/source/modules/juce_audio_plugin_client/LV2/juce_LV2_Wrapper_Exporter.cpp View File

@@ -371,6 +371,22 @@ static const String makePresetsFile (AudioProcessor* const filter)
text += "@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n";
text += "\n";

#if JucePlugin_WantsLV2State
#if JucePlugin_WantsLV2StateString
text += "<" JUCE_LV2_STATE_STRING_URI ">\n";
text += " a owl:DatatypeProperty ;\n";
text += " rdfs:label \"Plugin state as string\" ;\n";
text += " rdfs:domain state:State ;\n";
text += " rdfs:range xsd:string .\n";
#else
text += "<" JUCE_LV2_STATE_BINARY_URI ">\n";
text += " a owl:DatatypeProperty ;\n";
text += " rdfs:label \"Plugin state as base64-encoded string\" ;\n";
text += " rdfs:domain state:State ;\n";
text += " rdfs:range xsd:base64Binary .\n";
#endif
#endif

// Presets
const int numPrograms = filter->getNumPrograms();
const String presetSeparator(pluginURI.contains("#") ? ":" : "#");


Loading…
Cancel
Save