Browse Source

Allow to save properties when using vst chunks

tags/1.9.6
falkTX 9 years ago
parent
commit
27cd151daa
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      source/backend/plugin/CarlaPlugin.cpp

+ 19
- 0
source/backend/plugin/CarlaPlugin.cpp View File

@@ -529,6 +529,25 @@ const CarlaStateSave& CarlaPlugin::getStateSave(const bool callPrepareForSave)
pData->stateSave.chunk = CarlaString::asBase64(data, dataSize).dup();

// Don't save anything else if using chunks
// Well, except properties

for (LinkedList<CustomData>::Itenerator it = pData->custom.begin(); it.valid(); it.next())
{
const CustomData& cData(it.getValue(kCustomDataFallback));
CARLA_SAFE_ASSERT_CONTINUE(cData.isValid());

if (std::strcmp(cData.type, CUSTOM_DATA_TYPE_PROPERTY) != 0)
continue;

CarlaStateSave::CustomData* stateCustomData(new CarlaStateSave::CustomData());

stateCustomData->type = carla_strdup(cData.type);
stateCustomData->key = carla_strdup(cData.key);
stateCustomData->value = carla_strdup(cData.value);

pData->stateSave.customData.append(stateCustomData);
}

return pData->stateSave;
}
}


Loading…
Cancel
Save