DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 52a8f482389daa30a44c5fa85e80ce2aac44bf50
parent 975189fefe2aed8c9d4efd63f9b8c614ed5aa9ff
Author: falkTX <falktx@gmail.com>
Date:   Sat, 24 May 2014 14:47:49 +0100

New DISTRHO_PLUGIN_IS_RT_SAFE macro, enabled by default

Diffstat:
Mdistrho/src/DistrhoPluginChecks.h | 4++++
Mdistrho/src/DistrhoPluginLADSPA+DSSI.cpp | 4++++
Mdistrho/src/DistrhoPluginLV2export.cpp | 4++++
3 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/distrho/src/DistrhoPluginChecks.h b/distrho/src/DistrhoPluginChecks.h @@ -59,6 +59,10 @@ # define DISTRHO_PLUGIN_WANT_DIRECT_ACCESS 0 #endif +#ifndef DISTRHO_PLUGIN_IS_RT_SAFE +# define DISTRHO_PLUGIN_IS_RT_SAFE 1 +#endif + #define DISTRHO_UI_URI DISTRHO_PLUGIN_URI "#UI" #endif // DISTRHO_PLUGIN_CHECKS_H_INCLUDED diff --git a/distrho/src/DistrhoPluginLADSPA+DSSI.cpp b/distrho/src/DistrhoPluginLADSPA+DSSI.cpp @@ -446,7 +446,11 @@ static void dssi_run_synth(LADSPA_Handle instance, ulong sampleCount, snd_seq_ev static LADSPA_Descriptor sLadspaDescriptor = { /* UniqueID */ 0, /* Label */ nullptr, +#if DISTRHO_PLUGIN_IS_RT_SAFE /* Properties */ LADSPA_PROPERTY_HARD_RT_CAPABLE, +#else + /* Properties */ 0x0, +#endif /* Name */ nullptr, /* Maker */ nullptr, /* Copyright */ nullptr, diff --git a/distrho/src/DistrhoPluginLV2export.cpp b/distrho/src/DistrhoPluginLV2export.cpp @@ -166,8 +166,12 @@ void lv2_generate_ttl(const char* const basename) pluginString += ";\n\n"; // optionalFeatures +#if DISTRHO_PLUGIN_IS_RT_SAFE pluginString += " lv2:optionalFeature <" LV2_CORE__hardRTCapable "> ,\n"; pluginString += " <" LV2_BUF_SIZE__boundedBlockLength "> ;\n"; +#else + pluginString += " lv2:optionalFeature <" LV2_BUF_SIZE__boundedBlockLength "> ;\n"; +#endif pluginString += "\n"; // requiredFeatures