diff --git a/source/includes/lv2_rdf.hpp b/source/includes/lv2_rdf.hpp index fce9653c6..78bb7f1da 100644 --- a/source/includes/lv2_rdf.hpp +++ b/source/includes/lv2_rdf.hpp @@ -174,28 +174,30 @@ typedef uint32_t LV2_Property; // Port Designation #define LV2_PORT_DESIGNATION_CONTROL 1 -#define LV2_PORT_DESIGNATION_FREEWHEELING 2 -#define LV2_PORT_DESIGNATION_LATENCY 3 -#define LV2_PORT_DESIGNATION_SAMPLE_RATE 4 -#define LV2_PORT_DESIGNATION_TIME_BAR 5 -#define LV2_PORT_DESIGNATION_TIME_BAR_BEAT 6 -#define LV2_PORT_DESIGNATION_TIME_BEAT 7 -#define LV2_PORT_DESIGNATION_TIME_BEAT_UNIT 8 -#define LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR 9 -#define LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE 10 -#define LV2_PORT_DESIGNATION_TIME_FRAME 11 -#define LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND 12 -#define LV2_PORT_DESIGNATION_TIME_SPEED 13 -#define LV2_PORT_DESIGNATION_TIME_TICKS_PER_BEAT 14 - -#define LV2_IS_PORT_DESIGNATION_CONTROL(x) ((x) == LV2_PORT_DESIGNATION_CONTROL) -#define LV2_IS_PORT_DESIGNATION_FREEWHEELING(x) ((x) == LV2_PORT_DESIGNATION_FREEWHEELING) -#define LV2_IS_PORT_DESIGNATION_LATENCY(x) ((x) == LV2_PORT_DESIGNATION_LATENCY) -#define LV2_IS_PORT_DESIGNATION_SAMPLE_RATE(x) ((x) == LV2_PORT_DESIGNATION_SAMPLE_RATE) -#define LV2_IS_PORT_DESIGNATION_TIME_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR) -#define LV2_IS_PORT_DESIGNATION_TIME_BAR_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR_BEAT) -#define LV2_IS_PORT_DESIGNATION_TIME_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT) -#define LV2_IS_PORT_DESIGNATION_TIME_BEAT_UNIT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT_UNIT) +#define LV2_PORT_DESIGNATION_ENABLED 2 +#define LV2_PORT_DESIGNATION_FREEWHEELING 3 +#define LV2_PORT_DESIGNATION_LATENCY 4 +#define LV2_PORT_DESIGNATION_SAMPLE_RATE 5 +#define LV2_PORT_DESIGNATION_TIME_BAR 6 +#define LV2_PORT_DESIGNATION_TIME_BAR_BEAT 7 +#define LV2_PORT_DESIGNATION_TIME_BEAT 8 +#define LV2_PORT_DESIGNATION_TIME_BEAT_UNIT 9 +#define LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR 10 +#define LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE 11 +#define LV2_PORT_DESIGNATION_TIME_FRAME 12 +#define LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND 13 +#define LV2_PORT_DESIGNATION_TIME_SPEED 14 +#define LV2_PORT_DESIGNATION_TIME_TICKS_PER_BEAT 15 + +#define LV2_IS_PORT_DESIGNATION_CONTROL(x) ((x) == LV2_PORT_DESIGNATION_CONTROL) +#define LV2_IS_PORT_DESIGNATION_ENABLED(x) ((x) == LV2_PORT_DESIGNATION_ENABLED) +#define LV2_IS_PORT_DESIGNATION_FREEWHEELING(x) ((x) == LV2_PORT_DESIGNATION_FREEWHEELING) +#define LV2_IS_PORT_DESIGNATION_LATENCY(x) ((x) == LV2_PORT_DESIGNATION_LATENCY) +#define LV2_IS_PORT_DESIGNATION_SAMPLE_RATE(x) ((x) == LV2_PORT_DESIGNATION_SAMPLE_RATE) +#define LV2_IS_PORT_DESIGNATION_TIME_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR) +#define LV2_IS_PORT_DESIGNATION_TIME_BAR_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR_BEAT) +#define LV2_IS_PORT_DESIGNATION_TIME_BEAT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT) +#define LV2_IS_PORT_DESIGNATION_TIME_BEAT_UNIT(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEAT_UNIT) #define LV2_IS_PORT_DESIGNATION_TIME_BEATS_PER_BAR(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR) #define LV2_IS_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE(x) ((x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE) #define LV2_IS_PORT_DESIGNATION_TIME_FRAME(x) ((x) == LV2_PORT_DESIGNATION_TIME_FRAME) diff --git a/source/utils/CarlaLv2Utils.hpp b/source/utils/CarlaLv2Utils.hpp index 853c3664b..0154566bf 100644 --- a/source/utils/CarlaLv2Utils.hpp +++ b/source/utils/CarlaLv2Utils.hpp @@ -107,6 +107,9 @@ typedef std::map LilvScalePointMap; #define LV2_UI__makeResident LV2_UI_PREFIX "makeResident" #define LV2_UI__makeSONameResident LV2_UI_PREFIX "makeSONameResident" +// TODO: update LV2 headers once again +#define LV2_CORE__enabled LV2_CORE_PREFIX "enabled" ///< http://lv2plug.in/ns/lv2core#enabled + // ----------------------------------------------------------------------- // Custom Atom types @@ -906,6 +909,8 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri, const bool loadPresets) { /**/ if (std::strcmp(designation, LV2_CORE__control) == 0) rdfPort->Designation = LV2_PORT_DESIGNATION_CONTROL; + else if (std::strcmp(designation, LV2_CORE__enabled) == 0) + rdfPort->Designation = LV2_PORT_DESIGNATION_ENABLED; else if (std::strcmp(designation, LV2_CORE__freeWheeling) == 0) rdfPort->Designation = LV2_PORT_DESIGNATION_FREEWHEELING; else if (std::strcmp(designation, LV2_CORE__latency) == 0)