Browse Source

Set lv2:control as designation for event ports

Signed-off-by: falkTX <falktx@falktx.com>
pull/375/head
parent
commit
a461061fef
2 changed files with 13 additions and 7 deletions
  1. +2
    -2
      distrho/src/DistrhoPluginLV2.cpp
  2. +11
    -5
      distrho/src/DistrhoPluginLV2export.cpp

+ 2
- 2
distrho/src/DistrhoPluginLV2.cpp View File

@@ -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);
}


+ 11
- 5
distrho/src/DistrhoPluginLV2export.cpp View File

@@ -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;


Loading…
Cancel
Save