Browse Source

Set lv2:enabled meta-data for plugins (ignored for now)

tags/1.9.7b
falkTX 7 years ago
parent
commit
10ebda3165
2 changed files with 29 additions and 22 deletions
  1. +24
    -22
      source/includes/lv2_rdf.hpp
  2. +5
    -0
      source/utils/CarlaLv2Utils.hpp

+ 24
- 22
source/includes/lv2_rdf.hpp View File

@@ -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)


+ 5
- 0
source/utils/CarlaLv2Utils.hpp View File

@@ -107,6 +107,9 @@ typedef std::map<double,const LilvScalePoint*> 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)


Loading…
Cancel
Save