@@ -1271,6 +1271,9 @@ public: | |||||
case LV2_PORT_UNIT_SEMITONE: | case LV2_PORT_UNIT_SEMITONE: | ||||
std::strncpy(strBuf, "semi", STR_MAX); | std::strncpy(strBuf, "semi", STR_MAX); | ||||
return true; | return true; | ||||
case LV2_PORT_UNIT_VOLTS: | |||||
std::strncpy(strBuf, "v", STR_MAX); | |||||
return true; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -96,6 +96,7 @@ typedef uint32_t LV2_Property; | |||||
#define LV2_PORT_UNIT_PC 22 | #define LV2_PORT_UNIT_PC 22 | ||||
#define LV2_PORT_UNIT_S 23 | #define LV2_PORT_UNIT_S 23 | ||||
#define LV2_PORT_UNIT_SEMITONE 24 | #define LV2_PORT_UNIT_SEMITONE 24 | ||||
#define LV2_PORT_UNIT_VOLTS 25 | |||||
#define LV2_IS_PORT_UNIT_BAR(x) ((x) == LV2_PORT_UNIT_BAR) | #define LV2_IS_PORT_UNIT_BAR(x) ((x) == LV2_PORT_UNIT_BAR) | ||||
#define LV2_IS_PORT_UNIT_BEAT(x) ((x) == LV2_PORT_UNIT_BEAT) | #define LV2_IS_PORT_UNIT_BEAT(x) ((x) == LV2_PORT_UNIT_BEAT) | ||||
@@ -121,6 +122,7 @@ typedef uint32_t LV2_Property; | |||||
#define LV2_IS_PORT_UNIT_PC(x) ((x) == LV2_PORT_UNIT_PC) | #define LV2_IS_PORT_UNIT_PC(x) ((x) == LV2_PORT_UNIT_PC) | ||||
#define LV2_IS_PORT_UNIT_S(x) ((x) == LV2_PORT_UNIT_S) | #define LV2_IS_PORT_UNIT_S(x) ((x) == LV2_PORT_UNIT_S) | ||||
#define LV2_IS_PORT_UNIT_SEMITONE(x) ((x) == LV2_PORT_UNIT_SEMITONE) | #define LV2_IS_PORT_UNIT_SEMITONE(x) ((x) == LV2_PORT_UNIT_SEMITONE) | ||||
#define LV2_IS_PORT_UNIT_VOLTS(x) ((x) == LV2_PORT_UNIT_VOLTS) | |||||
// Port Types | // Port Types | ||||
#define LV2_PORT_INPUT 0x001 | #define LV2_PORT_INPUT 0x001 | ||||
@@ -2291,6 +2291,8 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool loadPresets) | |||||
rdfPort->Unit.Unit = LV2_PORT_UNIT_S; | rdfPort->Unit.Unit = LV2_PORT_UNIT_S; | ||||
else if (std::strcmp(unitUnit, LV2_UNITS__semitone12TET) == 0) | else if (std::strcmp(unitUnit, LV2_UNITS__semitone12TET) == 0) | ||||
rdfPort->Unit.Unit = LV2_PORT_UNIT_SEMITONE; | rdfPort->Unit.Unit = LV2_PORT_UNIT_SEMITONE; | ||||
else if (std::strcmp(unitUnit, "http://moddevices.com/ns/mod#volts") == 0) | |||||
rdfPort->Unit.Unit = LV2_PORT_UNIT_VOLTS; | |||||
else | else | ||||
carla_stderr("lv2_rdf_new(\"%s\") - got unknown unit '%s'", uri, unitUnit); | carla_stderr("lv2_rdf_new(\"%s\") - got unknown unit '%s'", uri, unitUnit); | ||||
} | } | ||||
@@ -2603,6 +2605,8 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool loadPresets) | |||||
rdfParam.Unit.Unit = LV2_PORT_UNIT_S; | rdfParam.Unit.Unit = LV2_PORT_UNIT_S; | ||||
else if (std::strcmp(unitUnit, LV2_UNITS__semitone12TET) == 0) | else if (std::strcmp(unitUnit, LV2_UNITS__semitone12TET) == 0) | ||||
rdfParam.Unit.Unit = LV2_PORT_UNIT_SEMITONE; | rdfParam.Unit.Unit = LV2_PORT_UNIT_SEMITONE; | ||||
else if (std::strcmp(unitUnit, "http://moddevices.com/ns/mod#volts") == 0) | |||||
rdfParam.Unit.Unit = LV2_PORT_UNIT_VOLTS; | |||||
else | else | ||||
carla_stderr("lv2_rdf_new(\"%s\") - got unknown unit '%s'", uri, unitUnit); | carla_stderr("lv2_rdf_new(\"%s\") - got unknown unit '%s'", uri, unitUnit); | ||||
} | } | ||||