Browse Source

LV2: Load default plugin state if no midi-programs are available

tags/1.9.4
falkTX 12 years ago
parent
commit
af7582fb59
1 changed files with 13 additions and 0 deletions
  1. +13
    -0
      source/backend/plugin/Lv2Plugin.cpp

+ 13
- 0
source/backend/plugin/Lv2Plugin.cpp View File

@@ -2180,7 +2180,20 @@ public:
if (init)
{
if (count > 0)
{
setMidiProgram(0, false, false, false);
}
else
{
// load default state
if (const LilvState* state = gLv2World.getState(fDescriptor->URI, (LV2_URID_Map*)fFeatures[kFeatureIdUridMap]->data))
{
lilv_state_restore(state, fExt.state, fHandle, carla_lilv_set_port_value, this, 0, fFeatures);

if (fHandle2 != nullptr)
lilv_state_restore(state, fExt.state, fHandle2, carla_lilv_set_port_value, this, 0, fFeatures);
}
}
}
else
{


Loading…
Cancel
Save