Browse Source

Set PLUGIN_IS_RTSAFE flag (unused for now)

tags/1.9.4
falkTX 12 years ago
parent
commit
c01c7f529d
5 changed files with 26 additions and 6 deletions
  1. +3
    -0
      source/backend/plugin/DssiPlugin.cpp
  2. +0
    -1
      source/backend/plugin/FluidSynthPlugin.cpp
  3. +3
    -0
      source/backend/plugin/LadspaPlugin.cpp
  4. +0
    -1
      source/backend/plugin/LinuxSamplerPlugin.cpp
  5. +20
    -4
      source/backend/plugin/Lv2Plugin.cpp

+ 3
- 0
source/backend/plugin/DssiPlugin.cpp View File

@@ -757,6 +757,9 @@ public:
// plugin hints // plugin hints
fHints = 0x0; fHints = 0x0;


if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties))
fHints |= PLUGIN_IS_RTSAFE;

if (fGuiFilename.isNotEmpty()) if (fGuiFilename.isNotEmpty())
fHints |= PLUGIN_HAS_GUI; fHints |= PLUGIN_HAS_GUI;




+ 0
- 1
source/backend/plugin/FluidSynthPlugin.cpp View File

@@ -787,7 +787,6 @@ public:


// plugin hints // plugin hints
fHints = 0x0; fHints = 0x0;
fHints |= PLUGIN_IS_RTSAFE;
fHints |= PLUGIN_IS_SYNTH; fHints |= PLUGIN_IS_SYNTH;
fHints |= PLUGIN_CAN_VOLUME; fHints |= PLUGIN_CAN_VOLUME;
fHints |= PLUGIN_CAN_BALANCE; fHints |= PLUGIN_CAN_BALANCE;


+ 3
- 0
source/backend/plugin/LadspaPlugin.cpp View File

@@ -739,6 +739,9 @@ public:
// plugin hints // plugin hints
fHints = 0x0; fHints = 0x0;


if (LADSPA_IS_HARD_RT_CAPABLE(fDescriptor->Properties))
fHints |= PLUGIN_IS_RTSAFE;

if (aOuts > 0 && (aIns == aOuts || aIns == 1)) if (aOuts > 0 && (aIns == aOuts || aIns == 1))
fHints |= PLUGIN_CAN_DRYWET; fHints |= PLUGIN_CAN_DRYWET;




+ 0
- 1
source/backend/plugin/LinuxSamplerPlugin.cpp View File

@@ -402,7 +402,6 @@ public:


// plugin hints // plugin hints
fHints = 0x0; fHints = 0x0;
fHints |= PLUGIN_IS_RTSAFE;
fHints |= PLUGIN_IS_SYNTH; fHints |= PLUGIN_IS_SYNTH;
fHints |= PLUGIN_CAN_VOLUME; fHints |= PLUGIN_CAN_VOLUME;
fHints |= PLUGIN_CAN_BALANCE; fHints |= PLUGIN_CAN_BALANCE;


+ 20
- 4
source/backend/plugin/Lv2Plugin.cpp View File

@@ -1970,6 +1970,9 @@ public:
// plugin hints // plugin hints
fHints = 0x0; fHints = 0x0;


if (isRealtimeSafe())
fHints |= PLUGIN_IS_RTSAFE;

if (fUi.type != PLUGIN_UI_NULL) if (fUi.type != PLUGIN_UI_NULL)
{ {
fHints |= PLUGIN_HAS_GUI; fHints |= PLUGIN_HAS_GUI;
@@ -3491,7 +3494,20 @@ protected:


// ------------------------------------------------------------------- // -------------------------------------------------------------------


bool needsFixedBuffer()
bool isRealtimeSafe() const
{
CARLA_ASSERT(fRdfDescriptor != nullptr);

for (uint32_t i=0; i < fRdfDescriptor->FeatureCount; ++i)
{
if (std::strcmp(fRdfDescriptor->Features[i].URI, LV2_CORE__hardRTCapable) == 0)
return true;
}

return false;
}

bool needsFixedBuffer() const
{ {
CARLA_ASSERT(fRdfDescriptor != nullptr); CARLA_ASSERT(fRdfDescriptor != nullptr);


@@ -3506,7 +3522,7 @@ protected:


// ------------------------------------------------------------------- // -------------------------------------------------------------------


const char* getUiBridgePath(const LV2_Property type)
const char* getUiBridgePath(const LV2_Property type) const
{ {
const EngineOptions& options(kData->engine->getOptions()); const EngineOptions& options(kData->engine->getOptions());


@@ -3531,7 +3547,7 @@ protected:
} }
} }


bool isUiBridgeable(const uint32_t uiId)
bool isUiBridgeable(const uint32_t uiId) const
{ {
const LV2_RDF_UI& rdfUi(fRdfDescriptor->UIs[uiId]); const LV2_RDF_UI& rdfUi(fRdfDescriptor->UIs[uiId]);


@@ -3546,7 +3562,7 @@ protected:
return true; return true;
} }


bool isUiResizable()
bool isUiResizable() const
{ {
for (uint32_t i=0; i < fUi.rdfDescriptor->FeatureCount; ++i) for (uint32_t i=0; i < fUi.rdfDescriptor->FeatureCount; ++i)
{ {


Loading…
Cancel
Save