DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit a461061fef0959f5fabbe580c7c65a9cb9c6e514
parent 2d58e840beb47164b2765bb38c0801edaf2684c9
Author: falkTX <falktx@falktx.com>
Date:   Fri, 11 Feb 2022 02:23:59 +0000

Set lv2:control as designation for event ports

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdistrho/src/DistrhoPluginLV2.cpp | 4++--
Mdistrho/src/DistrhoPluginLV2export.cpp | 16+++++++++++-----
2 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/distrho/src/DistrhoPluginLV2.cpp b/distrho/src/DistrhoPluginLV2.cpp @@ -588,8 +588,8 @@ public: const LV2_Atom* value = nullptr; lv2_atom_object_get(object, fURIDs.patchProperty, &property, fURIDs.patchValue, &value, nullptr); - if (property != nullptr && property->type == fURIDs.atomURID && value != nullptr && - (value->type == fURIDs.atomPath || value->type == fURIDs.atomString)) + if (property != nullptr && property->type == fURIDs.atomURID && + value != nullptr && (value->type == fURIDs.atomPath || value->type == fURIDs.atomString)) { fWorker->schedule_work(fWorker->handle, sizeof(LV2_Atom)+event->body.size, &event->body); } diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp @@ -369,7 +369,6 @@ void lv2_generate_ttl(const char* const basename) pluginString += "\n"; #if DISTRHO_PLUGIN_WANT_STATE - // define writable states as lv2 parameters bool hasHostVisibleState = false; for (uint32_t i=0, count=plugin.getStateCount(); i < count; ++i) @@ -429,10 +428,11 @@ void lv2_generate_ttl(const char* const basename) continue; const String& key(plugin.getStateKey(i)); - pluginString += " patch:readable <" DISTRHO_PLUGIN_URI "#" + key + "> ;\n"; if ((hints & kStateIsHostWritable) == kStateIsHostWritable) pluginString += " patch:writable <" DISTRHO_PLUGIN_URI "#" + key + "> ;\n"; + else + pluginString += " patch:readable <" DISTRHO_PLUGIN_URI "#" + key + "> ;\n"; } pluginString += "\n"; } @@ -641,12 +641,15 @@ void lv2_generate_ttl(const char* const basename) # if DISTRHO_PLUGIN_WANT_MIDI_INPUT pluginString += " atom:supports midi:MidiEvent ;\n"; # endif +# if DISTRHO_PLUGIN_WANT_TIMEPOS + pluginString += " atom:supports <" LV2_TIME__Position "> ;\n"; +# endif # if DISTRHO_PLUGIN_WANT_STATE if (hasHostVisibleState) + { pluginString += " atom:supports <" LV2_PATCH__Message "> ;\n"; -# endif -# if DISTRHO_PLUGIN_WANT_TIMEPOS - pluginString += " atom:supports <" LV2_TIME__Position "> ;\n"; + pluginString += " lv2:designation lv2:control ;\n"; + } # endif pluginString += " ] ;\n\n"; ++portIndex; @@ -668,7 +671,10 @@ void lv2_generate_ttl(const char* const basename) # endif # if DISTRHO_PLUGIN_WANT_STATE if (hasHostVisibleState) + { pluginString += " atom:supports <" LV2_PATCH__Message "> ;\n"; + pluginString += " lv2:designation lv2:control ;\n"; + } # endif pluginString += " ] ;\n\n"; ++portIndex;