|
|
|
@@ -37,6 +37,7 @@ |
|
|
|
#include "lv2/worker.h" |
|
|
|
#include "lv2/lv2_kxstudio_properties.h" |
|
|
|
#include "lv2/lv2_programs.h" |
|
|
|
#include "lv2/control-input-port-change-request.h" |
|
|
|
|
|
|
|
#ifdef DISTRHO_PLUGIN_LICENSED_FOR_MOD |
|
|
|
# include "mod-license.h" |
|
|
|
@@ -90,52 +91,51 @@ |
|
|
|
#define DISTRHO_LV2_USE_EVENTS_IN (DISTRHO_PLUGIN_WANT_MIDI_INPUT || DISTRHO_PLUGIN_WANT_TIMEPOS || DISTRHO_PLUGIN_WANT_STATE) |
|
|
|
#define DISTRHO_LV2_USE_EVENTS_OUT (DISTRHO_PLUGIN_WANT_MIDI_OUTPUT || DISTRHO_PLUGIN_WANT_STATE) |
|
|
|
|
|
|
|
#define DISTRHO_BYPASS_PARAMETER_NAME "lv2_enabled" |
|
|
|
// -------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
// ----------------------------------------------------------------------- |
|
|
|
static const char* const lv2ManifestPluginExtensionData[] = |
|
|
|
{ |
|
|
|
static constexpr const char* const lv2ManifestPluginExtensionData[] = { |
|
|
|
"opts:interface", |
|
|
|
#if DISTRHO_PLUGIN_WANT_STATE |
|
|
|
#if DISTRHO_PLUGIN_WANT_STATE |
|
|
|
LV2_STATE__interface, |
|
|
|
LV2_WORKER__interface, |
|
|
|
#endif |
|
|
|
#if DISTRHO_PLUGIN_WANT_PROGRAMS |
|
|
|
#endif |
|
|
|
#if DISTRHO_PLUGIN_WANT_PROGRAMS |
|
|
|
LV2_PROGRAMS__Interface, |
|
|
|
#endif |
|
|
|
#ifdef DISTRHO_PLUGIN_LICENSED_FOR_MOD |
|
|
|
#endif |
|
|
|
#ifdef DISTRHO_PLUGIN_LICENSED_FOR_MOD |
|
|
|
MOD_LICENSE__interface, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
|
|
|
|
static const char* const lv2ManifestPluginOptionalFeatures[] = |
|
|
|
{ |
|
|
|
#if DISTRHO_PLUGIN_IS_RT_SAFE |
|
|
|
static constexpr const char* const lv2ManifestPluginOptionalFeatures[] = { |
|
|
|
#if DISTRHO_PLUGIN_IS_RT_SAFE |
|
|
|
LV2_CORE__hardRTCapable, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
LV2_BUF_SIZE__boundedBlockLength, |
|
|
|
#if DISTRHO_PLUGIN_WANT_STATE |
|
|
|
#if DISTRHO_PLUGIN_WANT_STATE |
|
|
|
LV2_STATE__mapPath, |
|
|
|
LV2_STATE__freePath, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#if DISTRHO_PLUGIN_WANT_PARAMETER_VALUE_CHANGE_REQUEST |
|
|
|
LV2_CONTROL_INPUT_PORT_CHANGE_REQUEST_URI, |
|
|
|
#endif |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
|
|
|
|
static const char* const lv2ManifestPluginRequiredFeatures[] = |
|
|
|
{ |
|
|
|
static constexpr const char* const lv2ManifestPluginRequiredFeatures[] = { |
|
|
|
"opts:options", |
|
|
|
LV2_URID__map, |
|
|
|
#if DISTRHO_PLUGIN_WANT_STATE |
|
|
|
#if DISTRHO_PLUGIN_WANT_STATE |
|
|
|
LV2_WORKER__schedule, |
|
|
|
#endif |
|
|
|
#ifdef DISTRHO_PLUGIN_LICENSED_FOR_MOD |
|
|
|
#endif |
|
|
|
#ifdef DISTRHO_PLUGIN_LICENSED_FOR_MOD |
|
|
|
MOD_LICENSE__feature, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
|
|
|
|
static const char* const lv2ManifestPluginSupportedOptions[] = |
|
|
|
static constexpr const char* const lv2ManifestPluginSupportedOptions[] = |
|
|
|
{ |
|
|
|
LV2_BUF_SIZE__nominalBlockLength, |
|
|
|
LV2_BUF_SIZE__maxBlockLength, |
|
|
|
@@ -144,44 +144,40 @@ static const char* const lv2ManifestPluginSupportedOptions[] = |
|
|
|
}; |
|
|
|
|
|
|
|
#if DISTRHO_PLUGIN_HAS_UI |
|
|
|
static const char* const lv2ManifestUiExtensionData[] = |
|
|
|
{ |
|
|
|
static constexpr const char* const lv2ManifestUiExtensionData[] = { |
|
|
|
"opts:interface", |
|
|
|
"ui:idleInterface", |
|
|
|
"ui:showInterface", |
|
|
|
#if DISTRHO_PLUGIN_WANT_PROGRAMS |
|
|
|
#if DISTRHO_PLUGIN_WANT_PROGRAMS |
|
|
|
LV2_PROGRAMS__UIInterface, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
|
|
|
|
static const char* const lv2ManifestUiOptionalFeatures[] = |
|
|
|
{ |
|
|
|
#if DISTRHO_PLUGIN_HAS_EMBED_UI |
|
|
|
# if !DISTRHO_UI_USER_RESIZABLE |
|
|
|
static constexpr const char* const lv2ManifestUiOptionalFeatures[] = { |
|
|
|
#if DISTRHO_PLUGIN_HAS_EMBED_UI |
|
|
|
#if !DISTRHO_UI_USER_RESIZABLE |
|
|
|
"ui:noUserResize", |
|
|
|
# endif |
|
|
|
#endif |
|
|
|
"ui:parent", |
|
|
|
"ui:touch", |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
"ui:requestValue", |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
|
|
|
|
static const char* const lv2ManifestUiRequiredFeatures[] = |
|
|
|
{ |
|
|
|
static constexpr const char* const lv2ManifestUiRequiredFeatures[] = { |
|
|
|
"opts:options", |
|
|
|
"ui:idleInterface", |
|
|
|
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
#if DISTRHO_PLUGIN_WANT_DIRECT_ACCESS |
|
|
|
LV2_DATA_ACCESS_URI, |
|
|
|
LV2_INSTANCE_ACCESS_URI, |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
LV2_URID__map, |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
|
|
|
|
static const char* const lv2ManifestUiSupportedOptions[] = |
|
|
|
{ |
|
|
|
static constexpr const char* const lv2ManifestUiSupportedOptions[] = { |
|
|
|
LV2_PARAMETERS__sampleRate, |
|
|
|
nullptr |
|
|
|
}; |
|
|
|
@@ -231,7 +227,7 @@ static void addAttribute(DISTRHO_NAMESPACE::String& text, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// ----------------------------------------------------------------------- |
|
|
|
// -------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
DISTRHO_PLUGIN_EXPORT |
|
|
|
void lv2_generate_ttl(const char* const basename) |
|
|
|
|