Browse Source

LV2: Fix custom unit render format for integer parameters

Signed-off-by: falkTX <falktx@falktx.com>
pull/293/head
falkTX 4 years ago
parent
commit
c5a3e7ce76
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      distrho/src/DistrhoPluginLV2export.cpp

+ 4
- 1
distrho/src/DistrhoPluginLV2export.cpp View File

@@ -794,7 +794,10 @@ void lv2_generate_ttl(const char* const basename)
pluginString += " a unit:Unit ;\n";
pluginString += " rdfs:label \"" + unit + "\" ;\n";
pluginString += " unit:symbol \"" + unit + "\" ;\n";
pluginString += " unit:render \"%f " + unit + "\" ;\n";
if (plugin.getParameterHints(i) & kParameterIsInteger)
pluginString += " unit:render \"%d " + unit + "\" ;\n";
else
pluginString += " unit:render \"%f " + unit + "\" ;\n";
pluginString += " ] ;\n";
}
}


Loading…
Cancel
Save