From f3ee9dfedbef79ef589876c9d5dce0e4fc55f0e0 Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 7 Jan 2018 22:56:56 +0100 Subject: [PATCH] carla-lv2: export supported options --- source/plugin/carla-lv2-export.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/source/plugin/carla-lv2-export.cpp b/source/plugin/carla-lv2-export.cpp index 51a90b86f..57a9d4e48 100644 --- a/source/plugin/carla-lv2-export.cpp +++ b/source/plugin/carla-lv2-export.cpp @@ -23,6 +23,7 @@ #include "lv2/instance-access.h" #include "lv2/midi.h" #include "lv2/options.h" +#include "lv2/parameters.h" #include "lv2/port-props.h" #include "lv2/state.h" #include "lv2/time.h" @@ -109,6 +110,7 @@ static void writeManifestFile(PluginListManager& plm) // Header text += "@prefix lv2: <" LV2_CORE_PREFIX "> .\n"; + text += "@prefix opts: <" LV2_OPTIONS_PREFIX "> .\n"; text += "@prefix rdfs: .\n"; text += "@prefix ui: <" LV2_UI_PREFIX "> .\n"; text += "\n"; @@ -141,7 +143,8 @@ static void writeManifestFile(PluginListManager& plm) text += " lv2:optionalFeature <" LV2_UI__fixedSize "> ,\n"; text += " <" LV2_UI__noUserResize "> ;\n"; text += " lv2:requiredFeature <" LV2_INSTANCE_ACCESS_URI "> ,\n"; - text += " <" LV2_UI__resize "> .\n"; + text += " <" LV2_UI__resize "> ;\n"; + text += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> .\n"; text += "\n"; #endif @@ -151,7 +154,8 @@ static void writeManifestFile(PluginListManager& plm) text += " lv2:extensionData <" LV2_UI__idleInterface "> ,\n"; text += " <" LV2_UI__showInterface "> ,\n"; text += " <" LV2_PROGRAMS__UIInterface "> ;\n"; - text += " lv2:requiredFeature <" LV2_INSTANCE_ACCESS_URI "> .\n"; + text += " lv2:requiredFeature <" LV2_INSTANCE_ACCESS_URI "> ;\n"; + text += " opts:supportedOption <" LV2_PARAMETERS__sampleRate "> .\n"; // ------------------------------------------------------------------- // Write file now @@ -215,6 +219,7 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc) text += "@prefix doap: .\n"; text += "@prefix foaf: .\n"; text += "@prefix lv2: <" LV2_CORE_PREFIX "> .\n"; + text += "@prefix opts: <" LV2_OPTIONS_PREFIX "> .\n"; text += "@prefix rdf: .\n"; text += "@prefix rdfs: .\n"; text += "@prefix ui: <" LV2_UI_PREFIX "> .\n"; @@ -289,6 +294,14 @@ static void writePluginFile(const NativePluginDescriptor* const pluginDesc) text += "\n"; + // ------------------------------------------------------------------- + // Options + + text += " opts:supportedOption <" LV2_BUF_SIZE__nominalBlockLength "> ,\n"; + text += " <" LV2_BUF_SIZE__maxBlockLength "> ,\n"; + text += " <" LV2_PARAMETERS__sampleRate "> ;\n"; + text += "\n"; + // ------------------------------------------------------------------- // UIs