Browse Source

Fix possible minor issues when loading xmz or xiz files directly

tags/1.9.4
falkTX 10 years ago
parent
commit
2dd68f55fb
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      source/modules/native-plugins/zynaddsubfx-synth.cpp

+ 12
- 0
source/modules/native-plugins/zynaddsubfx-synth.cpp View File

@@ -605,10 +605,22 @@ protected:
CARLA_SAFE_ASSERT_RETURN(key != nullptr,);
CARLA_SAFE_ASSERT_RETURN(value != nullptr,);

pthread_mutex_lock(&fMaster->mutex);

if (std::strcmp(key, "CarlaAlternateFile1") == 0) // xmz
{
fMaster->defaults();
fMaster->loadXML(value);
}
else if (std::strcmp(key, "CarlaAlternateFile2") == 0) // xiz
{
fMaster->part[0]->defaultsinstrument();
fMaster->part[0]->loadXMLinstrument(value);
}

pthread_mutex_unlock(&fMaster->mutex);

fMaster->applyparameters();
}

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


Loading…
Cancel
Save