From de7066324be9b8daa4bcce22d65f7872e18644c4 Mon Sep 17 00:00:00 2001 From: Christopher Arndt Date: Mon, 4 Nov 2019 18:56:14 +0100 Subject: [PATCH] Export LV2 scalePoint for integer ports as integer values not float Signed-off-by: Christopher Arndt --- distrho/src/DistrhoPluginLV2export.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp index 0afe4fad..d7998c87 100644 --- a/distrho/src/DistrhoPluginLV2export.cpp +++ b/distrho/src/DistrhoPluginLV2export.cpp @@ -561,7 +561,11 @@ void lv2_generate_ttl(const char* const basename) pluginString += " [\n"; pluginString += " rdfs:label \"\"\"" + enumValue.label + "\"\"\" ;\n"; - pluginString += " rdf:value " + String(enumValue.value) + " ;\n"; + + if (plugin.getParameterHints(i) & kParameterIsInteger) + pluginString += " rdf:value " + String((int) enumValue.value) + " ;\n"; + else + pluginString += " rdf:value " + String(enumValue.value) + " ;\n"; if (j+1 == enumValues.count) pluginString += " ] ;\n\n";