[SCM] calf/master: + LV2: initial implementation of scalepoints (enums)

js at users.alioth.debian.org js at users.alioth.debian.org
Tue May 7 15:36:57 UTC 2013


The following commit has been merged in the master branch:
commit b23795c942da411f197b21b47c8a56ad3b152b43
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date:   Sat Jan 12 19:03:11 2008 +0000

    + LV2: initial implementation of scalepoints (enums)
    
    
    
    git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@90 78b06b96-2940-0410-b7fc-879d825d01d8

diff --git a/src/makerdf.cpp b/src/makerdf.cpp
index a03ef58..473a589 100644
--- a/src/makerdf.cpp
+++ b/src/makerdf.cpp
@@ -85,7 +85,15 @@ static void add_ctl_port(string &ports, parameter_properties &pp, int pidx)
     ss << ind << "lv2:index " << pidx << " ;\n";
     ss << ind << "lv2:symbol \"" << pp.short_name << "\" ;\n";
     ss << ind << "lv2:name \"" << pp.name << "\" ;\n";
-    if ((pp.flags & PF_TYPEMASK) > 0)
+    if ((pp.flags & PF_TYPEMASK) == PF_BOOL)
+        ss << ind << "lv2:portProperty lv2:toggled ;\n";
+    else if ((pp.flags & PF_TYPEMASK) == PF_ENUM)
+    {
+        ss << ind << "lv2:portProperty lv2:integer ;\n";
+        for (int i = (int)pp.min; i <= (int)pp.max; i++)
+            ss << ind << "lv2:scalePoint [ lv2:label \"" << pp.choices[i - (int)pp.min] << "\"; rdf:value " << i <<" ] ;\n";
+    }
+    else if ((pp.flags & PF_TYPEMASK) > 0)
         ss << ind << "lv2:portProperty lv2:integer ;\n";
     ss << showpoint;
     ss << ind << "lv2:default " << pp.def_value << " ;\n";

-- 
calf audio plugins packaging



More information about the pkg-multimedia-commits mailing list