diff --git a/c++/carla-engine/carla_engine.hpp b/c++/carla-engine/carla_engine.hpp index 7e276e4..9496250 100644 --- a/c++/carla-engine/carla_engine.hpp +++ b/c++/carla-engine/carla_engine.hpp @@ -21,6 +21,8 @@ #include "carla_engine_osc.hpp" #include "carla_engine_thread.hpp" +#include + CARLA_BACKEND_START_NAMESPACE /*! @@ -206,7 +208,6 @@ struct CarlaEngineTimeInfo { valid(0) {} }; -#ifndef BUILD_BRIDGE /*! * Engine options. */ @@ -252,7 +253,6 @@ struct CarlaEngineOptions { preferUiBridges(true), oscUiTimeout(4000/100) {} }; -#endif // ----------------------------------------------------------------------- @@ -557,7 +557,7 @@ public: /*! * Maximum number of loadable plugins. - * \note This function returns 0 if no engine is not started. + * \note This function returns 0 if engine is not started. */ unsigned short maxPluginNumber() const; @@ -710,7 +710,6 @@ public: */ void setLastError(const char* const error); -#ifndef BUILD_BRIDGE // ------------------------------------------------------------------- // Options @@ -722,6 +721,15 @@ public: return options; } +#ifndef BUILD_BRIDGE + /*! + * Get the engine options as process environment. + */ + const QProcessEnvironment& getOptionsAsProcessEnvironment() const + { + return m_procEnv; + } + /*! * Set the engine option \a option. */ @@ -916,9 +924,7 @@ protected: void processRack(float* inBuf[2], float* outBuf[2], const uint32_t frames); #endif -#ifndef BUILD_BRIDGE CarlaEngineOptions options; -#endif CarlaString name; uint32_t bufferSize; @@ -937,6 +943,10 @@ private: void* m_callbackPtr; CarlaString m_lastError; +#ifndef BUILD_BRIDGE + QProcessEnvironment m_procEnv; +#endif + QMutex m_procLock; QMutex m_midiLock; diff --git a/c++/carla-includes/ladspa_rdf.hpp b/c++/carla-includes/ladspa_rdf.hpp index 1a7eb90..82b2a6b 100644 --- a/c++/carla-includes/ladspa_rdf.hpp +++ b/c++/carla-includes/ladspa_rdf.hpp @@ -18,6 +18,8 @@ #ifndef LADSPA_RDF_INCLUDED #define LADSPA_RDF_INCLUDED +// FIXME - use LADSPA_PORT_UNIT_xxx + #include // Base Types diff --git a/c++/carla-includes/lv2_rdf.hpp b/c++/carla-includes/lv2_rdf.hpp index 28048a8..5d267e9 100644 --- a/c++/carla-includes/lv2_rdf.hpp +++ b/c++/carla-includes/lv2_rdf.hpp @@ -24,11 +24,25 @@ #include // Base Types -typedef float LV2_Data; typedef const char* LV2_URI; typedef uint32_t LV2_Property; typedef unsigned long long LV2_PluginType; +struct LV2_Type { + LV2_Property Value; //... + LV2_URI URI; + + LV2_Type() + : Value(0), + URI(nullptr) {} + + ~LV2_Type() + { + if (URI) + ::free((void*)URI); + } +}; + // Port Midi Map Types #define LV2_PORT_MIDI_MAP_CC 0x1 #define LV2_PORT_MIDI_MAP_NRPN 0x2 @@ -45,67 +59,67 @@ typedef unsigned long long LV2_PluginType; #define LV2_HAVE_MINIMUM_PORT_POINT(x) ((x) & LV2_PORT_POINT_MINIMUM) #define LV2_HAVE_MAXIMUM_PORT_POINT(x) ((x) & LV2_PORT_POINT_MAXIMUM) -// Port Unit Types -#define LV2_UNIT_BAR 0x01 -#define LV2_UNIT_BEAT 0x02 -#define LV2_UNIT_BPM 0x03 -#define LV2_UNIT_CENT 0x04 -#define LV2_UNIT_CM 0x05 -#define LV2_UNIT_COEF 0x06 -#define LV2_UNIT_DB 0x07 -#define LV2_UNIT_DEGREE 0x08 -#define LV2_UNIT_FRAME 0x09 -#define LV2_UNIT_HZ 0x0A -#define LV2_UNIT_INCH 0x0B -#define LV2_UNIT_KHZ 0x0C -#define LV2_UNIT_KM 0x0D -#define LV2_UNIT_M 0x0E -#define LV2_UNIT_MHZ 0x0F -#define LV2_UNIT_MIDINOTE 0x10 -#define LV2_UNIT_MILE 0x11 -#define LV2_UNIT_MIN 0x12 -#define LV2_UNIT_MM 0x13 -#define LV2_UNIT_MS 0x14 -#define LV2_UNIT_OCT 0x15 -#define LV2_UNIT_PC 0x16 -#define LV2_UNIT_S 0x17 -#define LV2_UNIT_SEMITONE 0x18 - -#define LV2_IS_UNIT_BAR(x) ((x) == LV2_UNIT_BAR) -#define LV2_IS_UNIT_BEAT(x) ((x) == LV2_UNIT_BEAT) -#define LV2_IS_UNIT_BPM(x) ((x) == LV2_UNIT_BPM) -#define LV2_IS_UNIT_CENT(x) ((x) == LV2_UNIT_CENT) -#define LV2_IS_UNIT_CM(x) ((x) == LV2_UNIT_CM) -#define LV2_IS_UNIT_COEF(x) ((x) == LV2_UNIT_COEF) -#define LV2_IS_UNIT_DB(x) ((x) == LV2_UNIT_DB) -#define LV2_IS_UNIT_DEGREE(x) ((x) == LV2_UNIT_DEGREE) -#define LV2_IS_UNIT_FRAME(x) ((x) == LV2_UNIT_FRAME) -#define LV2_IS_UNIT_HZ(x) ((x) == LV2_UNIT_HZ) -#define LV2_IS_UNIT_INCH(x) ((x) == LV2_UNIT_INCH) -#define LV2_IS_UNIT_KHZ(x) ((x) == LV2_UNIT_KHZ) -#define LV2_IS_UNIT_KM(x) ((x) == LV2_UNIT_KM) -#define LV2_IS_UNIT_M(x) ((x) == LV2_UNIT_M) -#define LV2_IS_UNIT_MHZ(x) ((x) == LV2_UNIT_MHZ) -#define LV2_IS_UNIT_MIDINOTE(x) ((x) == LV2_UNIT_MIDINOTE) -#define LV2_IS_UNIT_MILE(x) ((x) == LV2_UNIT_MILE) -#define LV2_IS_UNIT_MIN(x) ((x) == LV2_UNIT_MIN) -#define LV2_IS_UNIT_MM(x) ((x) == LV2_UNIT_MM) -#define LV2_IS_UNIT_MS(x) ((x) == LV2_UNIT_MS) -#define LV2_IS_UNIT_OCT(x) ((x) == LV2_UNIT_OCT) -#define LV2_IS_UNIT_PC(x) ((x) == LV2_UNIT_PC) -#define LV2_IS_UNIT_S(x) ((x) == LV2_UNIT_S) -#define LV2_IS_UNIT_SEMITONE(x) ((x) == LV2_UNIT_SEMITONE) - // Port Unit Hints -#define LV2_PORT_UNIT 0x1 -#define LV2_PORT_UNIT_NAME 0x2 -#define LV2_PORT_UNIT_RENDER 0x4 -#define LV2_PORT_UNIT_SYMBOL 0x8 - -#define LV2_HAVE_UNIT(x) ((x) & LV2_PORT_UNIT) -#define LV2_HAVE_UNIT_NAME(x) ((x) & LV2_PORT_UNIT_NAME) -#define LV2_HAVE_UNIT_RENDER(x) ((x) & LV2_PORT_UNIT_RENDER) -#define LV2_HAVE_UNIT_SYMBOL(x) ((x) & LV2_PORT_UNIT_SYMBOL) +#define LV2_PORT_UNIT_NAME 0x1 +#define LV2_PORT_UNIT_RENDER 0x2 +#define LV2_PORT_UNIT_SYMBOL 0x4 +#define LV2_PORT_UNIT_UNIT 0x8 + +#define LV2_HAVE_PORT_UNIT_NAME(x) ((x) & LV2_PORT_UNIT_NAME) +#define LV2_HAVE_PORT_UNIT_RENDER(x) ((x) & LV2_PORT_UNIT_RENDER) +#define LV2_HAVE_PORT_UNIT_SYMBOL(x) ((x) & LV2_PORT_UNIT_SYMBOL) +#define LV2_HAVE_PORT_UNIT_UNIT(x) ((x) & LV2_PORT_UNIT_UNIT) + +// Port Unit Unit +#define LV2_PORT_UNIT_BAR 0x01 +#define LV2_PORT_UNIT_BEAT 0x02 +#define LV2_PORT_UNIT_BPM 0x03 +#define LV2_PORT_UNIT_CENT 0x04 +#define LV2_PORT_UNIT_CM 0x05 +#define LV2_PORT_UNIT_COEF 0x06 +#define LV2_PORT_UNIT_DB 0x07 +#define LV2_PORT_UNIT_DEGREE 0x08 +#define LV2_PORT_UNIT_FRAME 0x09 +#define LV2_PORT_UNIT_HZ 0x0A +#define LV2_PORT_UNIT_INCH 0x0B +#define LV2_PORT_UNIT_KHZ 0x0C +#define LV2_PORT_UNIT_KM 0x0D +#define LV2_PORT_UNIT_M 0x0E +#define LV2_PORT_UNIT_MHZ 0x0F +#define LV2_PORT_UNIT_MIDINOTE 0x10 +#define LV2_PORT_UNIT_MILE 0x11 +#define LV2_PORT_UNIT_MIN 0x12 +#define LV2_PORT_UNIT_MM 0x13 +#define LV2_PORT_UNIT_MS 0x14 +#define LV2_PORT_UNIT_OCT 0x15 +#define LV2_PORT_UNIT_PC 0x16 +#define LV2_PORT_UNIT_S 0x17 +#define LV2_PORT_UNIT_SEMITONE 0x18 + +#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_BPM(x) ((x) == LV2_PORT_UNIT_BPM) +#define LV2_IS_PORT_UNIT_CENT(x) ((x) == LV2_PORT_UNIT_CENT) +#define LV2_IS_PORT_UNIT_CM(x) ((x) == LV2_PORT_UNIT_CM) +#define LV2_IS_PORT_UNIT_COEF(x) ((x) == LV2_PORT_UNIT_COEF) +#define LV2_IS_PORT_UNIT_DB(x) ((x) == LV2_PORT_UNIT_DB) +#define LV2_IS_PORT_UNIT_DEGREE(x) ((x) == LV2_PORT_UNIT_DEGREE) +#define LV2_IS_PORT_UNIT_FRAME(x) ((x) == LV2_PORT_UNIT_FRAME) +#define LV2_IS_PORT_UNIT_HZ(x) ((x) == LV2_PORT_UNIT_HZ) +#define LV2_IS_PORT_UNIT_INCH(x) ((x) == LV2_PORT_UNIT_INCH) +#define LV2_IS_PORT_UNIT_KHZ(x) ((x) == LV2_PORT_UNIT_KHZ) +#define LV2_IS_PORT_UNIT_KM(x) ((x) == LV2_PORT_UNIT_KM) +#define LV2_IS_PORT_UNIT_M(x) ((x) == LV2_PORT_UNIT_M) +#define LV2_IS_PORT_UNIT_MHZ(x) ((x) == LV2_PORT_UNIT_MHZ) +#define LV2_IS_PORT_UNIT_MIDINOTE(x) ((x) == LV2_PORT_UNIT_MIDINOTE) +#define LV2_IS_PORT_UNIT_MILE(x) ((x) == LV2_PORT_UNIT_MILE) +#define LV2_IS_PORT_UNIT_MIN(x) ((x) == LV2_PORT_UNIT_MIN) +#define LV2_IS_PORT_UNIT_MM(x) ((x) == LV2_PORT_UNIT_MM) +#define LV2_IS_PORT_UNIT_MS(x) ((x) == LV2_PORT_UNIT_MS) +#define LV2_IS_PORT_UNIT_OCT(x) ((x) == LV2_PORT_UNIT_OCT) +#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_SEMITONE(x) ((x) == LV2_PORT_UNIT_SEMITONE) // Port Types #define LV2_PORT_INPUT 0x01 @@ -118,9 +132,9 @@ typedef unsigned long long LV2_PluginType; #define LV2_PORT_EVENT 0x80 #define LV2_PORT_MIDI_LL 0x100 -// Port Support Types -#define LV2_PORT_SUPPORTS_MIDI_EVENT 0x1000 -#define LV2_PORT_SUPPORTS_PATCH_MESSAGE 0x2000 +// Port Data Types +#define LV2_PORT_DATA_MIDI_EVENT 0x1000 +#define LV2_PORT_DATA_PATCH_MESSAGE 0x2000 #define LV2_IS_PORT_INPUT(x) ((x) & LV2_PORT_INPUT) #define LV2_IS_PORT_OUTPUT(x) ((x) & LV2_PORT_OUTPUT) @@ -131,6 +145,9 @@ typedef unsigned long long LV2_PluginType; #define LV2_IS_PORT_EVENT(x) ((x) & LV2_PORT_EVENT) #define LV2_IS_PORT_MIDI_LL(x) ((x) & LV2_PORT_MIDI_LL) +#define LV2_PORT_SUPPORTS_MIDI_EVENT ((x) & LV2_PORT_DATA_MIDI_EVENT) +#define LV2_PORT_SUPPORTS_PATCH_MESSAGE ((x) & LV2_PORT_DATA_PATCH_MESSAGE) + // Port Properties #define LV2_PORT_OPTIONAL 0x0001 #define LV2_PORT_ENUMERATION 0x0002 @@ -190,11 +207,7 @@ typedef unsigned long long LV2_PluginType; #define LV2_IS_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND(x) ((x) == LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND) #define LV2_IS_PORT_DESIGNATION_TIME_POSITION(x) ((x) == LV2_PORT_DESIGNATION_TIME_POSITION) #define LV2_IS_PORT_DESIGNATION_TIME_SPEED(x) ((x) == LV2_PORT_DESIGNATION_TIME_SPEED) -#define LV2_IS_PORT_DESIGNATION_TIME(x) ((x) == LV2_PORT_DESIGNATION_TIME_BAR || (x) == LV2_PORT_DESIGNATION_TIME_BAR_BEAT || \ - (x) == LV2_PORT_DESIGNATION_TIME_BEAT || (x) == LV2_PORT_DESIGNATION_TIME_BEAT_UNIT || \ - (x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_BAR || (x) == LV2_PORT_DESIGNATION_TIME_BEATS_PER_MINUTE || \ - (x) == LV2_PORT_DESIGNATION_TIME_FRAME || (x) == LV2_PORT_DESIGNATION_TIME_FRAMES_PER_SECOND || \ - (x) == LV2_PORT_DESIGNATION_TIME_POSITION || (x) == LV2_PORT_DESIGNATION_TIME_SPEED) +#define LV2_IS_PORT_DESIGNATION_TIME(x) ((x) >= LV2_PORT_DESIGNATION_TIME_BAR && (x) <= LV2_PORT_DESIGNATION_TIME_SPEED) // Preset State Types (TODO: Null is not a type, this is just a placeholder) #define LV2_PRESET_STATE_NULL 0x0 @@ -212,15 +225,17 @@ typedef unsigned long long LV2_PluginType; #define LV2_UI_GTK2 0x1 #define LV2_UI_GTK3 0x2 #define LV2_UI_QT4 0x3 -#define LV2_UI_COCOA 0x4 -#define LV2_UI_WINDOWS 0x5 -#define LV2_UI_X11 0x6 -#define LV2_UI_EXTERNAL 0x7 -#define LV2_UI_OLD_EXTERNAL 0x8 +#define LV2_UI_QT5 0x4 +#define LV2_UI_COCOA 0x5 +#define LV2_UI_WINDOWS 0x6 +#define LV2_UI_X11 0x7 +#define LV2_UI_EXTERNAL 0x8 +#define LV2_UI_OLD_EXTERNAL 0x9 #define LV2_IS_UI_GTK2(x) ((x) == LV2_UI_GTK2) #define LV2_IS_UI_GTK3(x) ((x) == LV2_UI_GTK3) #define LV2_IS_UI_QT4(x) ((x) == LV2_UI_QT4) +#define LV2_IS_UI_QT5(x) ((x) == LV2_UI_QT5) #define LV2_IS_UI_COCOA(x) ((x) == LV2_UI_COCOA) #define LV2_IS_UI_WINDOWS(x) ((x) == LV2_UI_WINDOWS) #define LV2_IS_UI_X11(x) ((x) == LV2_UI_X11) @@ -228,55 +243,55 @@ typedef unsigned long long LV2_PluginType; #define LV2_IS_UI_OLD_EXTERNAL(x) ((x) == LV2_UI_OLD_EXTERNAL) // Plugin Types -#define LV2_CLASS_ALLPASS 0x000000001LL -#define LV2_CLASS_AMPLIFIER 0x000000002LL -#define LV2_CLASS_ANALYSER 0x000000004LL -#define LV2_CLASS_BANDPASS 0x000000008LL -#define LV2_CLASS_CHORUS 0x000000010LL -#define LV2_CLASS_COMB 0x000000020LL -#define LV2_CLASS_COMPRESSOR 0x000000040LL -#define LV2_CLASS_CONSTANT 0x000000080LL -#define LV2_CLASS_CONVERTER 0x000000100LL -#define LV2_CLASS_DELAY 0x000000200LL -#define LV2_CLASS_DISTORTION 0x000000400LL -#define LV2_CLASS_DYNAMICS 0x000000800LL -#define LV2_CLASS_EQ 0x000001000LL -#define LV2_CLASS_EXPANDER 0x000002000LL -#define LV2_CLASS_FILTER 0x000004000LL -#define LV2_CLASS_FLANGER 0x000008000LL -#define LV2_CLASS_FUNCTION 0x000010000LL -#define LV2_CLASS_GATE 0x000020000LL -#define LV2_CLASS_GENERATOR 0x000040000LL -#define LV2_CLASS_HIGHPASS 0x000080000LL -#define LV2_CLASS_INSTRUMENT 0x000100000LL -#define LV2_CLASS_LIMITER 0x000200000LL -#define LV2_CLASS_LOWPASS 0x000400000LL -#define LV2_CLASS_MIXER 0x000800000LL -#define LV2_CLASS_MODULATOR 0x001000000LL -#define LV2_CLASS_MULTI_EQ 0x002000000LL -#define LV2_CLASS_OSCILLATOR 0x004000000LL -#define LV2_CLASS_PARA_EQ 0x008000000LL -#define LV2_CLASS_PHASER 0x010000000LL -#define LV2_CLASS_PITCH 0x020000000LL -#define LV2_CLASS_REVERB 0x040000000LL -#define LV2_CLASS_SIMULATOR 0x080000000LL -#define LV2_CLASS_SPATIAL 0x100000000LL -#define LV2_CLASS_SPECTRAL 0x200000000LL -#define LV2_CLASS_UTILITY 0x400000000LL -#define LV2_CLASS_WAVESHAPER 0x800000000LL - -#define LV2_GROUP_DELAY (LV2_CLASS_DELAY|LV2_CLASS_REVERB) -#define LV2_GROUP_DISTORTION (LV2_CLASS_DISTORTION|LV2_CLASS_WAVESHAPER) -#define LV2_GROUP_DYNAMICS (LV2_CLASS_DYNAMICS|LV2_CLASS_AMPLIFIER|LV2_CLASS_COMPRESSOR|LV2_CLASS_EXPANDER|LV2_CLASS_GATE|LV2_CLASS_LIMITER) -#define LV2_GROUP_EQ (LV2_CLASS_EQ|LV2_CLASS_PARA_EQ|LV2_CLASS_MULTI_EQ) -#define LV2_GROUP_FILTER (LV2_CLASS_FILTER|LV2_CLASS_ALLPASS|LV2_CLASS_BANDPASS|LV2_CLASS_COMB|LV2_GROUP_EQ|LV2_CLASS_HIGHPASS|LV2_CLASS_LOWPASS) -#define LV2_GROUP_GENERATOR (LV2_CLASS_GENERATOR|LV2_CLASS_CONSTANT|LV2_CLASS_INSTRUMENT|LV2_CLASS_OSCILLATOR) -#define LV2_GROUP_MODULATOR (LV2_CLASS_MODULATOR|LV2_CLASS_CHORUS|LV2_CLASS_FLANGER|LV2_CLASS_PHASER) -#define LV2_GROUP_REVERB (LV2_CLASS_REVERB) -#define LV2_GROUP_SIMULATOR (LV2_CLASS_SIMULATOR|LV2_CLASS_REVERB) -#define LV2_GROUP_SPATIAL (LV2_CLASS_SPATIAL) -#define LV2_GROUP_SPECTRAL (LV2_CLASS_SPECTRAL|LV2_CLASS_PITCH) -#define LV2_GROUP_UTILITY (LV2_CLASS_UTILITY|LV2_CLASS_ANALYSER|LV2_CLASS_CONVERTER|LV2_CLASS_FUNCTION|LV2_CLASS_MIXER) +#define LV2_PLUGIN_ALLPASS 0x000000001LL +#define LV2_PLUGIN_AMPLIFIER 0x000000002LL +#define LV2_PLUGIN_ANALYSER 0x000000004LL +#define LV2_PLUGIN_BANDPASS 0x000000008LL +#define LV2_PLUGIN_CHORUS 0x000000010LL +#define LV2_PLUGIN_COMB 0x000000020LL +#define LV2_PLUGIN_COMPRESSOR 0x000000040LL +#define LV2_PLUGIN_CONSTANT 0x000000080LL +#define LV2_PLUGIN_CONVERTER 0x000000100LL +#define LV2_PLUGIN_DELAY 0x000000200LL +#define LV2_PLUGIN_DISTORTION 0x000000400LL +#define LV2_PLUGIN_DYNAMICS 0x000000800LL +#define LV2_PLUGIN_EQ 0x000001000LL +#define LV2_PLUGIN_EXPANDER 0x000002000LL +#define LV2_PLUGIN_FILTER 0x000004000LL +#define LV2_PLUGIN_FLANGER 0x000008000LL +#define LV2_PLUGIN_FUNCTION 0x000010000LL +#define LV2_PLUGIN_GATE 0x000020000LL +#define LV2_PLUGIN_GENERATOR 0x000040000LL +#define LV2_PLUGIN_HIGHPASS 0x000080000LL +#define LV2_PLUGIN_INSTRUMENT 0x000100000LL +#define LV2_PLUGIN_LIMITER 0x000200000LL +#define LV2_PLUGIN_LOWPASS 0x000400000LL +#define LV2_PLUGIN_MIXER 0x000800000LL +#define LV2_PLUGIN_MODULATOR 0x001000000LL +#define LV2_PLUGIN_MULTI_EQ 0x002000000LL +#define LV2_PLUGIN_OSCILLATOR 0x004000000LL +#define LV2_PLUGIN_PARA_EQ 0x008000000LL +#define LV2_PLUGIN_PHASER 0x010000000LL +#define LV2_PLUGIN_PITCH 0x020000000LL +#define LV2_PLUGIN_REVERB 0x040000000LL +#define LV2_PLUGIN_SIMULATOR 0x080000000LL +#define LV2_PLUGIN_SPATIAL 0x100000000LL +#define LV2_PLUGIN_SPECTRAL 0x200000000LL +#define LV2_PLUGIN_UTILITY 0x400000000LL +#define LV2_PLUGIN_WAVESHAPER 0x800000000LL + +#define LV2_GROUP_DELAY (LV2_PLUGIN_DELAY|LV2_PLUGIN_REVERB) +#define LV2_GROUP_DISTORTION (LV2_PLUGIN_DISTORTION|LV2_PLUGIN_WAVESHAPER) +#define LV2_GROUP_DYNAMICS (LV2_PLUGIN_DYNAMICS|LV2_PLUGIN_AMPLIFIER|LV2_PLUGIN_COMPRESSOR|LV2_PLUGIN_EXPANDER|LV2_PLUGIN_GATE|LV2_PLUGIN_LIMITER) +#define LV2_GROUP_EQ (LV2_PLUGIN_EQ|LV2_PLUGIN_PARA_EQ|LV2_PLUGIN_MULTI_EQ) +#define LV2_GROUP_FILTER (LV2_PLUGIN_FILTER|LV2_PLUGIN_ALLPASS|LV2_PLUGIN_BANDPASS|LV2_PLUGIN_COMB|LV2_GROUP_EQ|LV2_PLUGIN_HIGHPASS|LV2_PLUGIN_LOWPASS) +#define LV2_GROUP_GENERATOR (LV2_PLUGIN_GENERATOR|LV2_PLUGIN_CONSTANT|LV2_PLUGIN_INSTRUMENT|LV2_PLUGIN_OSCILLATOR) +#define LV2_GROUP_MODULATOR (LV2_PLUGIN_MODULATOR|LV2_PLUGIN_CHORUS|LV2_PLUGIN_FLANGER|LV2_PLUGIN_PHASER) +#define LV2_GROUP_REVERB (LV2_PLUGIN_REVERB) +#define LV2_GROUP_SIMULATOR (LV2_PLUGIN_SIMULATOR|LV2_PLUGIN_REVERB) +#define LV2_GROUP_SPATIAL (LV2_PLUGIN_SPATIAL) +#define LV2_GROUP_SPECTRAL (LV2_PLUGIN_SPECTRAL|LV2_PLUGIN_PITCH) +#define LV2_GROUP_UTILITY (LV2_PLUGIN_UTILITY|LV2_PLUGIN_ANALYSER|LV2_PLUGIN_CONVERTER|LV2_PLUGIN_FUNCTION|LV2_PLUGIN_MIXER) #define LV2_IS_DELAY(x) ((x) & LV2_GROUP_DELAY) #define LV2_IS_DISTORTION(x) ((x) & LV2_GROUP_DISTORTION) @@ -304,9 +319,9 @@ struct LV2_RDF_PortMidiMap { // Port Points struct LV2_RDF_PortPoints { LV2_Property Hints; - LV2_Data Default; - LV2_Data Minimum; - LV2_Data Maximum; + float Default; + float Minimum; + float Maximum; LV2_RDF_PortPoints() : Hints(0x0), @@ -317,18 +332,18 @@ struct LV2_RDF_PortPoints { // Port Unit struct LV2_RDF_PortUnit { - LV2_Property Type; LV2_Property Hints; const char* Name; const char* Render; const char* Symbol; + LV2_Property Unit; LV2_RDF_PortUnit() - : Type(0), - Hints(0x0), + : Hints(0x0), Name(nullptr), Render(nullptr), - Symbol(nullptr) {} + Symbol(nullptr), + Unit(0) {} ~LV2_RDF_PortUnit() { @@ -346,7 +361,7 @@ struct LV2_RDF_PortUnit { // Port Scale Point struct LV2_RDF_PortScalePoint { const char* Label; - LV2_Data Value; + float Value; LV2_RDF_PortScalePoint() : Label(nullptr), @@ -361,7 +376,7 @@ struct LV2_RDF_PortScalePoint { // Port struct LV2_RDF_Port { - LV2_Property Type; + LV2_Type Type; LV2_Property Properties; LV2_Property Designation; const char* Name; @@ -375,8 +390,7 @@ struct LV2_RDF_Port { LV2_RDF_PortScalePoint* ScalePoints; LV2_RDF_Port() - : Type(0x0), - Properties(0x0), + : Properties(0x0), Designation(0), Name(nullptr), Symbol(nullptr), @@ -399,7 +413,7 @@ struct LV2_RDF_Port { // Preset Port struct LV2_RDF_PresetPort { const char* Symbol; - LV2_Data Value; + float Value; LV2_RDF_PresetPort() : Symbol(nullptr), @@ -484,7 +498,7 @@ struct LV2_RDF_Feature { // UI struct LV2_RDF_UI { - LV2_Property Type; + LV2_Type Type; LV2_URI URI; const char* Binary; const char* Bundle; @@ -496,8 +510,7 @@ struct LV2_RDF_UI { LV2_URI* Extensions; LV2_RDF_UI() - : Type(0), - URI(nullptr), + : URI(nullptr), Binary(nullptr), Bundle(nullptr), FeatureCount(0), diff --git a/c++/carla-lilv/config/serd_config.h b/c++/carla-lilv/config/serd_config.h index 83ea343..6e3c697 100644 --- a/c++/carla-lilv/config/serd_config.h +++ b/c++/carla-lilv/config/serd_config.h @@ -2,7 +2,7 @@ #ifndef _SERD_CONFIG_H_ #define _SERD_CONFIG_H_ -#define SERD_VERSION "0.18.0" +#define SERD_VERSION "0.18.2" #if defined(__APPLE__) || defined(__HAIKU__) #define HAVE_FMAX 1 diff --git a/c++/carla-lilv/config/sord_config.h b/c++/carla-lilv/config/sord_config.h index b14d278..05f79c1 100644 --- a/c++/carla-lilv/config/sord_config.h +++ b/c++/carla-lilv/config/sord_config.h @@ -2,7 +2,7 @@ #ifndef _SORD_CONFIG_H_ #define _SORD_CONFIG_H_ -#define SORD_VERSION "0.10.0" +#define SORD_VERSION "0.10.4" #define HAVE_SERD 1 #define HAVE_PCRE 1 diff --git a/c++/carla-plugin/Makefile b/c++/carla-plugin/Makefile index 1e6355f..ce2020c 100644 --- a/c++/carla-plugin/Makefile +++ b/c++/carla-plugin/Makefile @@ -60,4 +60,4 @@ carla_plugin.a: $(OBJS) $(CXX) -c $< $(BUILD_CXX_FLAGS) -o $@ clean: - rm -f *.a $(OBJS) + rm -f *.a *.o diff --git a/c++/carla-plugin/carla_plugin.cpp b/c++/carla-plugin/carla_plugin.cpp index 53d5d54..da973ec 100644 --- a/c++/carla-plugin/carla_plugin.cpp +++ b/c++/carla-plugin/carla_plugin.cpp @@ -61,7 +61,6 @@ CarlaPlugin::CarlaPlugin(CarlaEngine* const engine, const unsigned short id) m_fixedBufferSize = true; m_processHighPrecision = false; -#ifndef BUILD_BRIDGE { const CarlaEngineOptions& options(x_engine->getOptions()); @@ -70,7 +69,6 @@ CarlaPlugin::CarlaPlugin(CarlaEngine* const engine, const unsigned short id) if (options.processMode == PROCESS_MODE_CONTINUOUS_RACK) m_ctrlInChannel = m_id; } -#endif // latency m_latency = 0; @@ -432,7 +430,6 @@ void CarlaPlugin::getGuiInfo(GuiType* const type, bool* const resizable) // ------------------------------------------------------------------- // Set data (internal stuff) -#ifndef BUILD_BRIDGE void CarlaPlugin::setId(const unsigned short id) { m_id = id; @@ -440,7 +437,6 @@ void CarlaPlugin::setId(const unsigned short id) if (x_engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) m_ctrlInChannel = id; } -#endif void CarlaPlugin::setEnabled(const bool yesNo) { @@ -954,13 +950,7 @@ void CarlaPlugin::registerToOscClient() } // Plugin Parameters -#ifdef BUILD_BRIDGE - const uint32_t maxParameters = MAX_PARAMETERS; -#else - const uint32_t maxParameters = x_engine->getOptions().maxParameters; -#endif - - if (param.count > 0 && param.count < maxParameters) + if (param.count > 0 && param.count < x_engine->getOptions().maxParameters) { char bufName[STR_MAX], bufUnit[STR_MAX]; @@ -1106,14 +1096,8 @@ bool CarlaPlugin::waitForOscGuiShow() { qWarning("CarlaPlugin::waitForOscGuiShow()"); -#ifndef BUILD_BRIDGE - const uint oscUiTimeout = x_engine->getOptions().oscUiTimeout; -#else - const uint oscUiTimeout = 40; -#endif - // wait for UI 'update' call - for (uint i=0; i < oscUiTimeout; i++) + for (uint i=0, oscUiTimeout = x_engine->getOptions().oscUiTimeout; i < oscUiTimeout; i++) { if (osc.data.target) { @@ -1125,7 +1109,7 @@ bool CarlaPlugin::waitForOscGuiShow() carla_msleep(100); } - qWarning("CarlaPlugin::waitForOscGuiShow() - Timeout while waiting for UI to respond (waited %u msecs)", oscUiTimeout); + qWarning("CarlaPlugin::waitForOscGuiShow() - Timeout while waiting for UI to respond (waited %u msecs)", x_engine->getOptions().oscUiTimeout); return false; } diff --git a/c++/carla-plugin/carla_plugin.hpp b/c++/carla-plugin/carla_plugin.hpp index c4e6d47..c3229d6 100644 --- a/c++/carla-plugin/carla_plugin.hpp +++ b/c++/carla-plugin/carla_plugin.hpp @@ -460,14 +460,12 @@ public: // ------------------------------------------------------------------- // Set data (internal stuff) -#ifndef BUILD_BRIDGE /*! * Set the plugin's id to \a id. * * \see id() */ void setId(const unsigned short id); -#endif /*! * Enable or disable the plugin according to \a yesNo. @@ -834,15 +832,17 @@ public: const char* const label; }; +//#ifndef BUILD_BRIDGE static CarlaPlugin* newNative(const initializer& init); +//#endif static CarlaPlugin* newLADSPA(const initializer& init, const void* const extra); static CarlaPlugin* newDSSI(const initializer& init, const void* const extra); static CarlaPlugin* newLV2(const initializer& init); static CarlaPlugin* newVST(const initializer& init); +//#ifndef BUILD_BRIDGE static CarlaPlugin* newGIG(const initializer& init); static CarlaPlugin* newSF2(const initializer& init); static CarlaPlugin* newSFZ(const initializer& init); -//#ifndef BUILD_BRIDGE static CarlaPlugin* newBridge(const initializer& init, const BinaryType btype, const PluginType ptype, const void* const extra); //#endif diff --git a/c++/carla-plugin/carla_plugin_thread.cpp b/c++/carla-plugin/carla_plugin_thread.cpp index af93cdc..46a8ca6 100644 --- a/c++/carla-plugin/carla_plugin_thread.cpp +++ b/c++/carla-plugin/carla_plugin_thread.cpp @@ -15,7 +15,6 @@ * For a full copy of the GNU General Public License see the COPYING file */ -#include "carla_engine.hpp" #include "carla_plugin.hpp" #include @@ -69,9 +68,11 @@ void CarlaPluginThread::run() qDebug("CarlaPluginThread::run()"); if (! m_process) + { m_process = new QProcess(nullptr); - - m_process->setProcessChannelMode(QProcess::ForwardedChannels); + m_process->setProcessChannelMode(QProcess::ForwardedChannels); + m_process->setProcessEnvironment(engine->getOptionsAsProcessEnvironment()); + } QString name(plugin->name() ? plugin->name() : "(none)"); QStringList arguments; diff --git a/c++/carla-plugin/dssi.cpp b/c++/carla-plugin/dssi.cpp index 92e965d..26c6085 100644 --- a/c++/carla-plugin/dssi.cpp +++ b/c++/carla-plugin/dssi.cpp @@ -62,13 +62,8 @@ public: if (osc.thread) { -#ifndef BUILD_BRIDGE - const uint oscUiTimeout = x_engine->getOptions().oscUiTimeout; -#else - const uint oscUiTimeout = 40; -#endif // Wait a bit first, try safe quit, then force kill - if (osc.thread->isRunning() && ! osc.thread->wait(oscUiTimeout)) + if (osc.thread->isRunning() && ! osc.thread->wait(x_engine->getOptions().oscUiTimeout)) { qWarning("Failed to properly stop DSSI GUI thread"); osc.thread->terminate(); @@ -339,9 +334,7 @@ public: qDebug("DssiPlugin::reload() - start"); CARLA_ASSERT(descriptor && ldescriptor); -#ifndef BUILD_BRIDGE const ProcessMode processMode(x_engine->getOptions().processMode); -#endif // Safely disable plugin for reload const ScopedDisabler m(this); @@ -379,7 +372,6 @@ public: params += 1; } -#ifndef BUILD_BRIDGE if (x_engine->getOptions().forceStereo && (aIns == 1 || aOuts == 1) && ! h2) { h2 = ldescriptor->instantiate(ldescriptor, sampleRate); @@ -396,7 +388,6 @@ public: forcedStereoOut = true; } } -#endif if (descriptor->run_synth || descriptor->run_multiple_synths) mIns = 1; @@ -435,13 +426,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += ldescriptor->PortNames[i]; portName.truncate(portNameSize); @@ -634,13 +624,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-in"; portName.truncate(portNameSize); @@ -651,13 +640,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-out"; portName.truncate(portNameSize); @@ -668,13 +656,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "midi-in"; portName.truncate(portNameSize); @@ -691,13 +678,11 @@ public: if (midi.portMin && aOut.count > 0) m_hints |= PLUGIN_IS_SYNTH; -#ifndef BUILD_BRIDGE if (x_engine->getOptions().useDssiVstChunks && QString(m_filename).endsWith("dssi-vst.so", Qt::CaseInsensitive)) { if (descriptor->get_custom_data && descriptor->set_custom_data) m_hints |= PLUGIN_USES_CHUNKS; } -#endif if (aOuts > 0 && (aIns == aOuts || aIns == 1)) m_hints |= PLUGIN_CAN_DRYWET; @@ -813,7 +798,6 @@ public: midiprog.data[i].name = strdup(pdesc->Name ? pdesc->Name : ""); } -#ifndef BUILD_BRIDGE // Update OSC Names if (x_engine->isOscControlRegistered()) { @@ -822,7 +806,6 @@ public: for (i=0; i < midiprog.count; i++) x_engine->osc_send_control_set_midi_program_data(m_id, i, midiprog.data[i].bank, midiprog.data[i].program, midiprog.data[i].name); } -#endif if (init) { @@ -882,11 +865,7 @@ public: // -------------------------------------------------------------------------------------------------------- // Input VU -#ifndef BUILD_BRIDGE if (aIn.count > 0 && x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#else - if (aIn.count > 0) -#endif { if (aIn.count == 1) { @@ -1373,9 +1352,7 @@ public: } // Output VU -#ifndef BUILD_BRIDGE if (x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#endif { for (k=0; i < 2 && k < frames; k++) { @@ -1643,7 +1620,6 @@ CarlaPlugin* CarlaPlugin::newDSSI(const initializer& init, const void* const ext plugin->reload(); -# ifndef BUILD_BRIDGE if (init.engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) { if (! (plugin->hints() & PLUGIN_CAN_FORCE_STEREO)) @@ -1653,7 +1629,6 @@ CarlaPlugin* CarlaPlugin::newDSSI(const initializer& init, const void* const ext return nullptr; } } -# endif plugin->registerToOscClient(); diff --git a/c++/carla-plugin/ladspa.cpp b/c++/carla-plugin/ladspa.cpp index da67e97..e8d7979 100644 --- a/c++/carla-plugin/ladspa.cpp +++ b/c++/carla-plugin/ladspa.cpp @@ -338,9 +338,7 @@ public: qDebug("LadspaPlugin::reload() - start"); CARLA_ASSERT(descriptor); -#ifndef BUILD_BRIDGE const ProcessMode processMode(x_engine->getOptions().processMode); -#endif // Safely disable plugin for reload const ScopedDisabler m(this); @@ -378,7 +376,6 @@ public: params += 1; } -#ifndef BUILD_BRIDGE if (x_engine->getOptions().forceStereo && (aIns == 1 || aOuts == 1) && ! h2) { h2 = descriptor->instantiate(descriptor, sampleRate); @@ -395,7 +392,6 @@ public: forcedStereoOut = true; } } -#endif if (aIns > 0) { @@ -432,13 +428,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += descriptor->PortNames[i]; portName.truncate(portNameSize); @@ -626,13 +621,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-in"; portName.truncate(portNameSize); @@ -643,13 +637,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-out"; portName.truncate(portNameSize); @@ -748,11 +741,7 @@ public: // -------------------------------------------------------------------------------------------------------- // Input VU -#ifndef BUILD_BRIDGE if (aIn.count > 0 && x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#else - if (aIn.count > 0) -#endif { if (aIn.count == 1) { @@ -1045,9 +1034,7 @@ public: } // Output VU -#ifndef BUILD_BRIDGE if (x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#endif { for (k=0; i < 2 && k < frames; k++) { @@ -1229,7 +1216,7 @@ CARLA_BACKEND_START_NAMESPACE CarlaPlugin* CarlaPlugin::newLADSPA(const initializer& init, const void* const extra) { - qDebug("CarlaPlugin::newLADSPA(%p, \"%s\", \"%s\", \"%s\", %p)", init.engine, init.filename, init.name, init.label, extra); + qDebug("CarlaPlugin::newLADSPA({%p, \"%s\", \"%s\", \"%s\"}, %p)", init.engine, init.filename, init.name, init.label, extra); #ifdef WANT_LADSPA short id = init.engine->getNewPluginId(); @@ -1250,7 +1237,6 @@ CarlaPlugin* CarlaPlugin::newLADSPA(const initializer& init, const void* const e plugin->reload(); -# ifndef BUILD_BRIDGE if (init.engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) { if (! (plugin->hints() & PLUGIN_CAN_FORCE_STEREO)) @@ -1260,7 +1246,6 @@ CarlaPlugin* CarlaPlugin::newLADSPA(const initializer& init, const void* const e return nullptr; } } -# endif plugin->registerToOscClient(); diff --git a/c++/carla-plugin/lv2.cpp b/c++/carla-plugin/lv2.cpp index 54196ab..ced9855 100644 --- a/c++/carla-plugin/lv2.cpp +++ b/c++/carla-plugin/lv2.cpp @@ -343,13 +343,8 @@ public: case GUI_EXTERNAL_OSC: if (osc.thread) { -#ifndef BUILD_BRIDGE - const uint oscUiTimeout = x_engine->getOptions().oscUiTimeout; -#else - const uint oscUiTimeout = 40; -#endif // Wait a bit first, try safe quit, then force kill - if (osc.thread->isRunning() && ! osc.thread->wait(oscUiTimeout)) + if (osc.thread->isRunning() && ! osc.thread->wait(x_engine->getOptions().oscUiTimeout)) { qWarning("Failed to properly stop LV2 OSC GUI thread"); osc.thread->terminate(); @@ -435,9 +430,7 @@ public: if (features[lv2_feature_id_worker] && features[lv2_feature_id_worker]->data) delete (LV2_Worker_Schedule*)features[lv2_feature_id_worker]->data; -#ifndef BUILD_BRIDGE if (! x_engine->getOptions().processHighPrecision) -#endif { features[lv2_feature_id_bufsize_fixed] = nullptr; features[lv2_feature_id_bufsize_powerof2] = nullptr; @@ -695,83 +688,83 @@ public: { const LV2_RDF_Port* const port = &rdf_descriptor->Ports[rindex]; - if (LV2_HAVE_UNIT_SYMBOL(port->Unit.Hints) && port->Unit.Symbol) + if (LV2_HAVE_PORT_UNIT_SYMBOL(port->Unit.Hints) && port->Unit.Symbol) strncpy(strBuf, port->Unit.Symbol, STR_MAX); - else if (LV2_HAVE_UNIT(port->Unit.Hints)) + else if (LV2_HAVE_PORT_UNIT_UNIT(port->Unit.Hints)) { - switch (port->Unit.Type) + switch (port->Unit.Unit) { - case LV2_UNIT_BAR: + case LV2_PORT_UNIT_BAR: strncpy(strBuf, "bars", STR_MAX); return; - case LV2_UNIT_BEAT: + case LV2_PORT_UNIT_BEAT: strncpy(strBuf, "beats", STR_MAX); return; - case LV2_UNIT_BPM: + case LV2_PORT_UNIT_BPM: strncpy(strBuf, "BPM", STR_MAX); return; - case LV2_UNIT_CENT: + case LV2_PORT_UNIT_CENT: strncpy(strBuf, "ct", STR_MAX); return; - case LV2_UNIT_CM: + case LV2_PORT_UNIT_CM: strncpy(strBuf, "cm", STR_MAX); return; - case LV2_UNIT_COEF: + case LV2_PORT_UNIT_COEF: strncpy(strBuf, "(coef)", STR_MAX); return; - case LV2_UNIT_DB: + case LV2_PORT_UNIT_DB: strncpy(strBuf, "dB", STR_MAX); return; - case LV2_UNIT_DEGREE: + case LV2_PORT_UNIT_DEGREE: strncpy(strBuf, "deg", STR_MAX); return; - case LV2_UNIT_FRAME: + case LV2_PORT_UNIT_FRAME: strncpy(strBuf, "frames", STR_MAX); return; - case LV2_UNIT_HZ: + case LV2_PORT_UNIT_HZ: strncpy(strBuf, "Hz", STR_MAX); return; - case LV2_UNIT_INCH: + case LV2_PORT_UNIT_INCH: strncpy(strBuf, "in", STR_MAX); return; - case LV2_UNIT_KHZ: + case LV2_PORT_UNIT_KHZ: strncpy(strBuf, "kHz", STR_MAX); return; - case LV2_UNIT_KM: + case LV2_PORT_UNIT_KM: strncpy(strBuf, "km", STR_MAX); return; - case LV2_UNIT_M: + case LV2_PORT_UNIT_M: strncpy(strBuf, "m", STR_MAX); return; - case LV2_UNIT_MHZ: + case LV2_PORT_UNIT_MHZ: strncpy(strBuf, "MHz", STR_MAX); return; - case LV2_UNIT_MIDINOTE: + case LV2_PORT_UNIT_MIDINOTE: strncpy(strBuf, "note", STR_MAX); return; - case LV2_UNIT_MILE: + case LV2_PORT_UNIT_MILE: strncpy(strBuf, "mi", STR_MAX); return; - case LV2_UNIT_MIN: + case LV2_PORT_UNIT_MIN: strncpy(strBuf, "min", STR_MAX); return; - case LV2_UNIT_MM: + case LV2_PORT_UNIT_MM: strncpy(strBuf, "mm", STR_MAX); return; - case LV2_UNIT_MS: + case LV2_PORT_UNIT_MS: strncpy(strBuf, "ms", STR_MAX); return; - case LV2_UNIT_OCT: + case LV2_PORT_UNIT_OCT: strncpy(strBuf, "oct", STR_MAX); return; - case LV2_UNIT_PC: + case LV2_PORT_UNIT_PC: strncpy(strBuf, "%", STR_MAX); return; - case LV2_UNIT_S: + case LV2_PORT_UNIT_S: strncpy(strBuf, "s", STR_MAX); return; - case LV2_UNIT_SEMITONE: + case LV2_PORT_UNIT_SEMITONE: strncpy(strBuf, "semi", STR_MAX); return; } @@ -1111,9 +1104,7 @@ public: qDebug("Lv2Plugin::reload() - start"); CARLA_ASSERT(descriptor && rdf_descriptor); -#ifndef BUILD_BRIDGE const ProcessMode processMode(x_engine->getOptions().processMode); -#endif // Safely disable plugin for reload const ScopedDisabler m(this); @@ -1139,7 +1130,7 @@ public: for (uint32_t i=0; i < portCount; i++) { - const LV2_Property portType = rdf_descriptor->Ports[i].Type; + const LV2_Property portType = rdf_descriptor->Ports[i].Type.Value; if (LV2_IS_PORT_AUDIO(portType)) { @@ -1197,7 +1188,6 @@ public: ext.worker = (const LV2_Worker_Interface*)descriptor->extension_data(LV2_WORKER__interface); } -#ifndef BUILD_BRIDGE if (x_engine->getOptions().forceStereo && (aIns == 1 || aOuts == 1) && ! (h2 || ext.state || ext.worker)) { h2 = descriptor->instantiate(descriptor, sampleRate, rdf_descriptor->Bundle, features); @@ -1214,7 +1204,6 @@ public: forcedStereoOut = true; } } -#endif if (aIns > 0) { @@ -1311,19 +1300,18 @@ public: for (uint32_t i=0; i < portCount; i++) { - const LV2_Property portType = rdf_descriptor->Ports[i].Type; + const LV2_Property portType = rdf_descriptor->Ports[i].Type.Value; if (LV2_IS_PORT_AUDIO(portType) || LV2_IS_PORT_ATOM_SEQUENCE(portType) || LV2_IS_PORT_CV(portType) || LV2_IS_PORT_EVENT(portType) || LV2_IS_PORT_MIDI_LL(portType)) { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += rdf_descriptor->Ports[i].Name; portName.truncate(portNameSize); } @@ -1386,12 +1374,12 @@ public: evIn.data[j].rindex = i; - if (portType & LV2_PORT_SUPPORTS_MIDI_EVENT) + if (portType & LV2_PORT_DATA_MIDI_EVENT) { evIn.data[j].type |= CARLA_EVENT_TYPE_MIDI; evIn.data[j].port = (CarlaEngineMidiPort*)x_client->addPort(CarlaEnginePortTypeMIDI, portName, true); } - if (portType & LV2_PORT_SUPPORTS_PATCH_MESSAGE) + if (portType & LV2_PORT_DATA_PATCH_MESSAGE) { evIn.data[j].type |= CARLA_EVENT_TYPE_MESSAGE; } @@ -1404,12 +1392,12 @@ public: evOut.data[j].rindex = i; - if (portType & LV2_PORT_SUPPORTS_MIDI_EVENT) + if (portType & LV2_PORT_DATA_MIDI_EVENT) { evOut.data[j].type |= CARLA_EVENT_TYPE_MIDI; evOut.data[j].port = (CarlaEngineMidiPort*)x_client->addPort(CarlaEnginePortTypeMIDI, portName, false); } - if (portType & LV2_PORT_SUPPORTS_PATCH_MESSAGE) + if (portType & LV2_PORT_DATA_PATCH_MESSAGE) { evOut.data[j].type |= CARLA_EVENT_TYPE_MESSAGE; } @@ -1427,7 +1415,7 @@ public: evIn.data[j].rindex = i; - if (portType & LV2_PORT_SUPPORTS_MIDI_EVENT) + if (portType & LV2_PORT_DATA_MIDI_EVENT) { evIn.data[j].type |= CARLA_EVENT_TYPE_MIDI; evIn.data[j].port = (CarlaEngineMidiPort*)x_client->addPort(CarlaEnginePortTypeMIDI, portName, true); @@ -1441,7 +1429,7 @@ public: evOut.data[j].rindex = i; - if (portType & LV2_PORT_SUPPORTS_MIDI_EVENT) + if (portType & LV2_PORT_DATA_MIDI_EVENT) { evOut.data[j].type |= CARLA_EVENT_TYPE_MIDI; evOut.data[j].port = (CarlaEngineMidiPort*)x_client->addPort(CarlaEnginePortTypeMIDI, portName, false); @@ -1700,13 +1688,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-in"; portName.truncate(portNameSize); @@ -1717,13 +1704,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-out"; portName.truncate(portNameSize); @@ -1864,7 +1850,6 @@ public: midiprog.data[i].name = strdup(pdesc->name ? pdesc->name : ""); } -#ifndef BUILD_BRIDGE // Update OSC Names if (x_engine->isOscControlRegistered()) { @@ -1873,7 +1858,6 @@ public: for (i=0; i < midiprog.count; i++) x_engine->osc_send_control_set_midi_program_data(m_id, i, midiprog.data[i].bank, midiprog.data[i].program, midiprog.data[i].name); } -#endif if (init) { @@ -1991,11 +1975,7 @@ public: // -------------------------------------------------------------------------------------------------------- // Input VU -#ifndef BUILD_BRIDGE if (aIn.count > 0 && x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#else - if (aIn.count > 0) -#endif { if (aIn.count == 1) { @@ -2669,9 +2649,7 @@ public: } // Output VU -#ifndef BUILD_BRIDGE if (x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#endif { for (k=0; i < 2 && k < frames; k++) { @@ -3376,7 +3354,6 @@ public: const char* getUiBridgePath(const LV2_Property type) { -#ifndef BUILD_BRIDGE const CarlaEngineOptions options(x_engine->getOptions()); switch (type) @@ -3396,10 +3373,6 @@ public: default: return nullptr; } -#else - return nullptr; - Q_UNUSED(type); -#endif } bool isUiBridgeable(const uint32_t uiId) @@ -3988,7 +3961,6 @@ public: features[lv2_feature_id_bufsize_bounded]->URI = LV2_BUF_SIZE__boundedBlockLength; features[lv2_feature_id_bufsize_bounded]->data = nullptr; -#ifndef BUILD_BRIDGE if (x_engine->getOptions().processHighPrecision) { features[lv2_feature_id_bufsize_fixed] = new LV2_Feature; @@ -4000,7 +3972,6 @@ public: features[lv2_feature_id_bufsize_powerof2]->data = nullptr; } else -#endif { // fake, used only to keep a valid features-array features[lv2_feature_id_bufsize_fixed] = features[lv2_feature_id_bufsize_bounded]; @@ -4129,7 +4100,7 @@ public: // Check supported ports for (uint32_t i=0; i < rdf_descriptor->PortCount; i++) { - LV2_Property PortType = rdf_descriptor->Ports[i].Type; + LV2_Property PortType = rdf_descriptor->Ports[i].Type.Value; if (! bool(LV2_IS_PORT_AUDIO(PortType) || LV2_IS_PORT_CONTROL(PortType) || LV2_IS_PORT_ATOM_SEQUENCE(PortType) || LV2_IS_PORT_EVENT(PortType) || LV2_IS_PORT_MIDI_LL(PortType))) { if (! LV2_IS_PORT_OPTIONAL(rdf_descriptor->Ports[i].Properties)) @@ -4216,11 +4187,7 @@ public: int eQt4, eCocoa, eHWND, eX11, eGtk2, eGtk3, iCocoa, iHWND, iX11, iQt4, iExt, iSuil, iFinal; eQt4 = eCocoa = eHWND = eX11 = eGtk2 = eGtk3 = iQt4 = iCocoa = iHWND = iX11 = iExt = iSuil = iFinal = -1; -#ifdef BUILD_BRIDGE - const bool preferUiBridges = false; -#else - const bool preferUiBridges = x_engine->getOptions().preferUiBridges; -#endif + const bool preferUiBridges = (x_engine->getOptions().preferUiBridges && (m_hints & PLUGIN_IS_BRIDGE) == 0); for (uint32_t i=0; i < rdf_descriptor->UICount; i++) { @@ -4232,7 +4199,7 @@ public: continue; } - switch (rdf_descriptor->UIs[i].Type) + switch (rdf_descriptor->UIs[i].Type.Value) { case LV2_UI_QT4: if (isUiBridgeable(i) && preferUiBridges) @@ -4259,7 +4226,7 @@ public: break; case LV2_UI_GTK2: -#if defined(WANT_SUIL) || defined(BUILD_BRIDGE) +#ifdef WANT_SUIL // FIXME if (isUiBridgeable(i) && preferUiBridges) eGtk2 = i; #else @@ -4407,7 +4374,7 @@ public: // ----------------------------------------------------------- // initialize ui according to type - const LV2_Property uiType = ui.rdf_descriptor->Type; + const LV2_Property uiType = ui.rdf_descriptor->Type.Value; if (isBridged) { @@ -4507,7 +4474,7 @@ public: qDebug("Will use LV2 Gtk2 UI (suil)"); gui.type = GUI_EXTERNAL_SUIL; gui.resizable = isUiResizable(); - suil.handle = suil_instance_new(suil.host, this, LV2_UI__Qt4UI, rdf_descriptor->URI, ui.rdf_descriptor->URI, get_lv2_ui_uri(ui.rdf_descriptor->Type), ui.rdf_descriptor->Bundle, ui.rdf_descriptor->Binary, features); + suil.handle = suil_instance_new(suil.host, this, LV2_UI__Qt4UI, rdf_descriptor->URI, ui.rdf_descriptor->URI, ui.rdf_descriptor->Type.URI, ui.rdf_descriptor->Bundle, ui.rdf_descriptor->Binary, features); m_hints |= PLUGIN_USES_SINGLE_THREAD; if (suil.handle) @@ -4689,7 +4656,6 @@ CarlaPlugin* CarlaPlugin::newLV2(const initializer& init) plugin->reload(); -# ifndef BUILD_BRIDGE if (init.engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) { if (! (plugin->hints() & PLUGIN_CAN_FORCE_STEREO)) @@ -4699,7 +4665,6 @@ CarlaPlugin* CarlaPlugin::newLV2(const initializer& init) return nullptr; } } -# endif plugin->registerToOscClient(); plugin->updateUi(); diff --git a/c++/carla-plugin/vst.cpp b/c++/carla-plugin/vst.cpp index 5caca2d..0eb7b34 100644 --- a/c++/carla-plugin/vst.cpp +++ b/c++/carla-plugin/vst.cpp @@ -96,13 +96,8 @@ public: { if (osc.thread) { -#ifndef BUILD_BRIDGE - const uint oscUiTimeout = x_engine->getOptions().oscUiTimeout; -#else - const uint oscUiTimeout = 40; -#endif // Wait a bit first, try safe quit, then force kill - if (osc.thread->isRunning() && ! osc.thread->wait(oscUiTimeout)) + if (osc.thread->isRunning() && ! osc.thread->wait(x_engine->getOptions().oscUiTimeout)) { qWarning("Failed to properly stop VST OSC GUI thread"); osc.thread->terminate(); @@ -477,9 +472,7 @@ public: qDebug("VstPlugin::reload() - start"); CARLA_ASSERT(effect); -#ifndef BUILD_BRIDGE const ProcessMode processMode(x_engine->getOptions().processMode); -#endif // Safely disable plugin for reload const ScopedDisabler m(this); @@ -537,13 +530,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + char tmp[12] = { 0 }; sprintf(tmp, "input_%02i", j+1); portName += tmp; @@ -557,13 +549,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + char tmp[12] = { 0 }; sprintf(tmp, "output_%02i", j+1); portName += tmp; @@ -691,13 +682,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "control-in"; portName.truncate(portNameSize); @@ -708,13 +698,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "midi-in"; portName.truncate(portNameSize); @@ -725,13 +714,12 @@ public: { portName.clear(); -#ifndef BUILD_BRIDGE if (processMode == PROCESS_MODE_SINGLE_CLIENT) { portName = m_name; portName += ":"; } -#endif + portName += "midi-out"; portName.truncate(portNameSize); @@ -924,11 +912,7 @@ public: // -------------------------------------------------------------------------------------------------------- // Input VU -#ifndef BUILD_BRIDGE if (aIn.count > 0 && x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#else - if (aIn.count > 0) -#endif { if (aIn.count == 1) { @@ -1378,9 +1362,7 @@ public: } // Output VU -#ifndef BUILD_BRIDGE if (x_engine->getOptions().processMode != PROCESS_MODE_CONTINUOUS_RACK) -#endif { for (k=0; i < 2 && k < frames; k++) { @@ -1636,13 +1618,11 @@ public: if (! m_enabled) return 1; -#ifndef BUILD_BRIDGE if (x_engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) { qCritical("VstPlugin::handleAudioMasterIOChanged() - plugin asked IO change, but it's not supported in rack mode"); return 0; } -#endif engineProcessLock(); m_enabled = false; @@ -1777,10 +1757,8 @@ public: return -1; if (strcmp(feature, "acceptIOChanges") == 0) { -#ifndef BUILD_BRIDGE //if (CarlaEngine::processMode == PROCESS_MODE_CONTINUOUS_RACK) // return -1; -#endif return 1; } if (strcmp(feature, "sizeWindow") == 0) @@ -1986,11 +1964,8 @@ public: case audioMasterGetNumAutomatableParameters: // Deprecated in VST SDK 2.4 -#ifdef BUILD_BRIDGE - ret = MAX_PARAMETERS; -#else ret = 0; //x_engine->options.maxParameters; -#endif + if (effect && ret > effect->numParams) ret = effect->numParams; // FIXME @@ -2050,11 +2025,8 @@ public: else qWarning("VstPlugin::hostCallback::audioMasterGetBlockSize called without valid object"); if (ret == 0) -//#ifndef BUILD_BRIDGE // ret = CarlaEngine::processHighPrecision ? 8 : 512; -//#else ret = 512; -//#endif break; case audioMasterGetInputLatency: @@ -2347,7 +2319,7 @@ public: { m_hints |= PLUGIN_HAS_GUI; -#if defined(Q_OS_LINUX) && ! defined(BUILD_BRIDGE) && 0 // FIXME +#if defined(Q_OS_LINUX) && 0 // FIXME if (x_engine->options.bridge_vstx11 && x_engine->preferUiBridges() && ! (effect->flags & effFlagsProgramChunks)) { osc.thread = new CarlaPluginThread(x_engine, this, CarlaPluginThread::PLUGIN_THREAD_VST_GUI); @@ -2437,7 +2409,6 @@ CarlaPlugin* CarlaPlugin::newVST(const initializer& init) plugin->reload(); -# ifndef BUILD_BRIDGE if (init.engine->getOptions().processMode == PROCESS_MODE_CONTINUOUS_RACK) { if (! (plugin->hints() & PLUGIN_CAN_FORCE_STEREO)) @@ -2447,7 +2418,6 @@ CarlaPlugin* CarlaPlugin::newVST(const initializer& init) return nullptr; } } -# endif plugin->registerToOscClient(); diff --git a/c++/carla-utils/carla_lv2_utils.hpp b/c++/carla-utils/carla_lv2_utils.hpp index a13cb4b..8729169 100644 --- a/c++/carla-utils/carla_lv2_utils.hpp +++ b/c++/carla-utils/carla_lv2_utils.hpp @@ -369,77 +369,77 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) if (typeNodes.size() > 0) { if (typeNodes.contains(lv2World.class_allpass)) - rdfDescriptor->Type |= LV2_CLASS_ALLPASS; + rdfDescriptor->Type |= LV2_PLUGIN_ALLPASS; if (typeNodes.contains(lv2World.class_amplifier)) - rdfDescriptor->Type |= LV2_CLASS_AMPLIFIER; + rdfDescriptor->Type |= LV2_PLUGIN_AMPLIFIER; if (typeNodes.contains(lv2World.class_analyzer)) - rdfDescriptor->Type |= LV2_CLASS_ANALYSER; + rdfDescriptor->Type |= LV2_PLUGIN_ANALYSER; if (typeNodes.contains(lv2World.class_bandpass)) - rdfDescriptor->Type |= LV2_CLASS_BANDPASS; + rdfDescriptor->Type |= LV2_PLUGIN_BANDPASS; if (typeNodes.contains(lv2World.class_chorus)) - rdfDescriptor->Type |= LV2_CLASS_CHORUS; + rdfDescriptor->Type |= LV2_PLUGIN_CHORUS; if (typeNodes.contains(lv2World.class_comb)) - rdfDescriptor->Type |= LV2_CLASS_COMB; + rdfDescriptor->Type |= LV2_PLUGIN_COMB; if (typeNodes.contains(lv2World.class_compressor)) - rdfDescriptor->Type |= LV2_CLASS_COMPRESSOR; + rdfDescriptor->Type |= LV2_PLUGIN_COMPRESSOR; if (typeNodes.contains(lv2World.class_constant)) - rdfDescriptor->Type |= LV2_CLASS_CONSTANT; + rdfDescriptor->Type |= LV2_PLUGIN_CONSTANT; if (typeNodes.contains(lv2World.class_converter)) - rdfDescriptor->Type |= LV2_CLASS_CONVERTER; + rdfDescriptor->Type |= LV2_PLUGIN_CONVERTER; if (typeNodes.contains(lv2World.class_delay)) - rdfDescriptor->Type |= LV2_CLASS_DELAY; + rdfDescriptor->Type |= LV2_PLUGIN_DELAY; if (typeNodes.contains(lv2World.class_distortion)) - rdfDescriptor->Type |= LV2_CLASS_DISTORTION; + rdfDescriptor->Type |= LV2_PLUGIN_DISTORTION; if (typeNodes.contains(lv2World.class_dynamics)) - rdfDescriptor->Type |= LV2_CLASS_DYNAMICS; + rdfDescriptor->Type |= LV2_PLUGIN_DYNAMICS; if (typeNodes.contains(lv2World.class_eq)) - rdfDescriptor->Type |= LV2_CLASS_EQ; + rdfDescriptor->Type |= LV2_PLUGIN_EQ; if (typeNodes.contains(lv2World.class_expander)) - rdfDescriptor->Type |= LV2_CLASS_EXPANDER; + rdfDescriptor->Type |= LV2_PLUGIN_EXPANDER; if (typeNodes.contains(lv2World.class_filter)) - rdfDescriptor->Type |= LV2_CLASS_FILTER; + rdfDescriptor->Type |= LV2_PLUGIN_FILTER; if (typeNodes.contains(lv2World.class_flanger)) - rdfDescriptor->Type |= LV2_CLASS_FLANGER; + rdfDescriptor->Type |= LV2_PLUGIN_FLANGER; if (typeNodes.contains(lv2World.class_function)) - rdfDescriptor->Type |= LV2_CLASS_FUNCTION; + rdfDescriptor->Type |= LV2_PLUGIN_FUNCTION; if (typeNodes.contains(lv2World.class_gate)) - rdfDescriptor->Type |= LV2_CLASS_GATE; + rdfDescriptor->Type |= LV2_PLUGIN_GATE; if (typeNodes.contains(lv2World.class_generator)) - rdfDescriptor->Type |= LV2_CLASS_GENERATOR; + rdfDescriptor->Type |= LV2_PLUGIN_GENERATOR; if (typeNodes.contains(lv2World.class_highpass)) - rdfDescriptor->Type |= LV2_CLASS_HIGHPASS; + rdfDescriptor->Type |= LV2_PLUGIN_HIGHPASS; if (typeNodes.contains(lv2World.class_instrument)) - rdfDescriptor->Type |= LV2_CLASS_INSTRUMENT; + rdfDescriptor->Type |= LV2_PLUGIN_INSTRUMENT; if (typeNodes.contains(lv2World.class_limiter)) - rdfDescriptor->Type |= LV2_CLASS_LIMITER; + rdfDescriptor->Type |= LV2_PLUGIN_LIMITER; if (typeNodes.contains(lv2World.class_lowpass)) - rdfDescriptor->Type |= LV2_CLASS_LOWPASS; + rdfDescriptor->Type |= LV2_PLUGIN_LOWPASS; if (typeNodes.contains(lv2World.class_mixer)) - rdfDescriptor->Type |= LV2_CLASS_MIXER; + rdfDescriptor->Type |= LV2_PLUGIN_MIXER; if (typeNodes.contains(lv2World.class_modulator)) - rdfDescriptor->Type |= LV2_CLASS_MODULATOR; + rdfDescriptor->Type |= LV2_PLUGIN_MODULATOR; if (typeNodes.contains(lv2World.class_multiEQ)) - rdfDescriptor->Type |= LV2_CLASS_MULTI_EQ; + rdfDescriptor->Type |= LV2_PLUGIN_MULTI_EQ; if (typeNodes.contains(lv2World.class_oscillator)) - rdfDescriptor->Type |= LV2_CLASS_OSCILLATOR; + rdfDescriptor->Type |= LV2_PLUGIN_OSCILLATOR; if (typeNodes.contains(lv2World.class_paraEQ)) - rdfDescriptor->Type |= LV2_CLASS_PARA_EQ; + rdfDescriptor->Type |= LV2_PLUGIN_PARA_EQ; if (typeNodes.contains(lv2World.class_phaser)) - rdfDescriptor->Type |= LV2_CLASS_PHASER; + rdfDescriptor->Type |= LV2_PLUGIN_PHASER; if (typeNodes.contains(lv2World.class_pitch)) - rdfDescriptor->Type |= LV2_CLASS_PITCH; + rdfDescriptor->Type |= LV2_PLUGIN_PITCH; if (typeNodes.contains(lv2World.class_reverb)) - rdfDescriptor->Type |= LV2_CLASS_REVERB; + rdfDescriptor->Type |= LV2_PLUGIN_REVERB; if (typeNodes.contains(lv2World.class_simulator)) - rdfDescriptor->Type |= LV2_CLASS_SIMULATOR; + rdfDescriptor->Type |= LV2_PLUGIN_SIMULATOR; if (typeNodes.contains(lv2World.class_spatial)) - rdfDescriptor->Type |= LV2_CLASS_SPATIAL; + rdfDescriptor->Type |= LV2_PLUGIN_SPATIAL; if (typeNodes.contains(lv2World.class_spectral)) - rdfDescriptor->Type |= LV2_CLASS_SPECTRAL; + rdfDescriptor->Type |= LV2_PLUGIN_SPECTRAL; if (typeNodes.contains(lv2World.class_utility)) - rdfDescriptor->Type |= LV2_CLASS_UTILITY; + rdfDescriptor->Type |= LV2_PLUGIN_UTILITY; if (typeNodes.contains(lv2World.class_waveshaper)) - rdfDescriptor->Type |= LV2_CLASS_WAVESHAPER; + rdfDescriptor->Type |= LV2_PLUGIN_WAVESHAPER; } } @@ -512,6 +512,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) // -------------------------------------- // Set Port Mode and Type { +#if 0 // Mode if (lilvPort.is_a(lv2World.port_input)) rdf_port->Type |= LV2_PORT_INPUT; @@ -544,9 +545,9 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) Lilv::Nodes supportNodes(lilvPort.get_value(lv2World.atom_supports)); if (supportNodes.contains(lv2World.midi_event)) - rdf_port->Type |= LV2_PORT_SUPPORTS_MIDI_EVENT; + rdf_port->Type |= LV2_PORT_DATA_MIDI_EVENT; if (supportNodes.contains(lv2World.patch_message)) - rdf_port->Type |= LV2_PORT_SUPPORTS_PATCH_MESSAGE; + rdf_port->Type |= LV2_PORT_DATA_PATCH_MESSAGE; } else if (lilvPort.is_a(lv2World.port_event)) @@ -564,6 +565,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) } else +#endif qWarning("lv2_rdf_new(\"%s\") - port '%s' is of unkown type", uri, rdf_port->Name); } @@ -714,58 +716,58 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) if (unitTypeNodes.size() > 0) { - rdf_port->Unit.Hints |= LV2_PORT_UNIT; + rdf_port->Unit.Hints |= LV2_PORT_UNIT_UNIT; const char* const unitType = unitTypeNodes.get_first().as_uri(); if (strcmp(unitType, LV2_UNITS__bar) == 0) - rdf_port->Unit.Type = LV2_UNIT_BAR; + rdf_port->Unit.Unit = LV2_PORT_UNIT_BAR; else if (strcmp(unitType, LV2_UNITS__beat) == 0) - rdf_port->Unit.Type = LV2_UNIT_BEAT; + rdf_port->Unit.Unit = LV2_PORT_UNIT_BEAT; else if (strcmp(unitType, LV2_UNITS__bpm) == 0) - rdf_port->Unit.Type = LV2_UNIT_BPM; + rdf_port->Unit.Unit = LV2_PORT_UNIT_BPM; else if (strcmp(unitType, LV2_UNITS__cent) == 0) - rdf_port->Unit.Type = LV2_UNIT_CENT; + rdf_port->Unit.Unit = LV2_PORT_UNIT_CENT; else if (strcmp(unitType, LV2_UNITS__cm) == 0) - rdf_port->Unit.Type = LV2_UNIT_CM; + rdf_port->Unit.Unit = LV2_PORT_UNIT_CM; else if (strcmp(unitType, LV2_UNITS__coef) == 0) - rdf_port->Unit.Type = LV2_UNIT_COEF; + rdf_port->Unit.Unit = LV2_PORT_UNIT_COEF; else if (strcmp(unitType, LV2_UNITS__db) == 0) - rdf_port->Unit.Type = LV2_UNIT_DB; + rdf_port->Unit.Unit = LV2_PORT_UNIT_DB; else if (strcmp(unitType, LV2_UNITS__degree) == 0) - rdf_port->Unit.Type = LV2_UNIT_DEGREE; + rdf_port->Unit.Unit = LV2_PORT_UNIT_DEGREE; else if (strcmp(unitType, LV2_UNITS__frame) == 0) - rdf_port->Unit.Type = LV2_UNIT_FRAME; + rdf_port->Unit.Unit = LV2_PORT_UNIT_FRAME; else if (strcmp(unitType, LV2_UNITS__hz) == 0) - rdf_port->Unit.Type = LV2_UNIT_HZ; + rdf_port->Unit.Unit = LV2_PORT_UNIT_HZ; else if (strcmp(unitType, LV2_UNITS__inch) == 0) - rdf_port->Unit.Type = LV2_UNIT_INCH; + rdf_port->Unit.Unit = LV2_PORT_UNIT_INCH; else if (strcmp(unitType, LV2_UNITS__khz) == 0) - rdf_port->Unit.Type = LV2_UNIT_KHZ; + rdf_port->Unit.Unit = LV2_PORT_UNIT_KHZ; else if (strcmp(unitType, LV2_UNITS__km) == 0) - rdf_port->Unit.Type = LV2_UNIT_KM; + rdf_port->Unit.Unit = LV2_PORT_UNIT_KM; else if (strcmp(unitType, LV2_UNITS__m) == 0) - rdf_port->Unit.Type = LV2_UNIT_M; + rdf_port->Unit.Unit = LV2_PORT_UNIT_M; else if (strcmp(unitType, LV2_UNITS__mhz) == 0) - rdf_port->Unit.Type = LV2_UNIT_MHZ; + rdf_port->Unit.Unit = LV2_PORT_UNIT_MHZ; else if (strcmp(unitType, LV2_UNITS__midiNote) == 0) - rdf_port->Unit.Type = LV2_UNIT_MIDINOTE; + rdf_port->Unit.Unit = LV2_PORT_UNIT_MIDINOTE; else if (strcmp(unitType, LV2_UNITS__mile) == 0) - rdf_port->Unit.Type = LV2_UNIT_MILE; + rdf_port->Unit.Unit = LV2_PORT_UNIT_MILE; else if (strcmp(unitType, LV2_UNITS__min) == 0) - rdf_port->Unit.Type = LV2_UNIT_MIN; + rdf_port->Unit.Unit = LV2_PORT_UNIT_MIN; else if (strcmp(unitType, LV2_UNITS__mm) == 0) - rdf_port->Unit.Type = LV2_UNIT_MM; + rdf_port->Unit.Unit = LV2_PORT_UNIT_MM; else if (strcmp(unitType, LV2_UNITS__ms) == 0) - rdf_port->Unit.Type = LV2_UNIT_MS; + rdf_port->Unit.Unit = LV2_PORT_UNIT_MS; else if (strcmp(unitType, LV2_UNITS__oct) == 0) - rdf_port->Unit.Type = LV2_UNIT_OCT; + rdf_port->Unit.Unit = LV2_PORT_UNIT_OCT; else if (strcmp(unitType, LV2_UNITS__pc) == 0) - rdf_port->Unit.Type = LV2_UNIT_PC; + rdf_port->Unit.Unit = LV2_PORT_UNIT_PC; else if (strcmp(unitType, LV2_UNITS__s) == 0) - rdf_port->Unit.Type = LV2_UNIT_S; + rdf_port->Unit.Unit = LV2_PORT_UNIT_S; else if (strcmp(unitType, LV2_UNITS__semitone12TET) == 0) - rdf_port->Unit.Type = LV2_UNIT_SEMITONE; + rdf_port->Unit.Unit = LV2_PORT_UNIT_SEMITONE; else qWarning("lv2_rdf_new(\"%s\") - got unknown Unit type '%s'", uri, unitType); } @@ -993,6 +995,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) // -------------------------------------- // Set UI Type { +#if 0 if (lilvUI.is_a(lv2World.ui_gtk2)) rdf_ui->Type = LV2_UI_GTK2; else if (lilvUI.is_a(lv2World.ui_gtk3)) @@ -1010,6 +1013,7 @@ const LV2_RDF_Descriptor* lv2_rdf_new(const LV2_URI uri) else if (lilvUI.is_a(lv2World.ui_externalOld)) rdf_ui->Type = LV2_UI_OLD_EXTERNAL; else +#endif qWarning("lv2_rdf_new(\"%s\") - got unknown UI type for '%s'", uri, lilvUI.get_uri().as_uri()); }