Browse Source

Correct usage of LV2 options interface to change plugin block size

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 4 years ago
parent
commit
a58501468e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 12 additions and 3 deletions
  1. +12
    -3
      source/backend/plugin/CarlaPluginLV2.cpp

+ 12
- 3
source/backend/plugin/CarlaPluginLV2.cpp View File

@@ -4608,11 +4608,20 @@ public:

if (fExt.options != nullptr && fExt.options->set != nullptr)
{
fExt.options->set(fHandle, &fLv2Options.opts[CarlaPluginLV2Options::MaxBlockLenth]);
fExt.options->set(fHandle, &fLv2Options.opts[CarlaPluginLV2Options::NominalBlockLenth]);
LV2_Options_Option options[2];
carla_zeroStructs(options, 2);

carla_copyStruct(options[0], fLv2Options.opts[CarlaPluginLV2Options::MaxBlockLenth]);
fExt.options->set(fHandle, options);

carla_copyStruct(options[0], fLv2Options.opts[CarlaPluginLV2Options::NominalBlockLenth]);
fExt.options->set(fHandle, options);

if (fLv2Options.minBufferSize != 1)
fExt.options->set(fHandle, &fLv2Options.opts[CarlaPluginLV2Options::MinBlockLenth]);
{
carla_copyStruct(options[0], fLv2Options.opts[CarlaPluginLV2Options::MinBlockLenth]);
fExt.options->set(fHandle, options);
}
}
}



Loading…
Cancel
Save