MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / LoadState

Method LoadState

Source/VSTPlugin.cpp:1286–1310  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1284}
1285
1286void VSTPlugin::LoadState(FileStreamIn& in, int rev)
1287{
1288 if (rev >= 3)
1289 {
1290 LoadVSTFromSaveData(in, rev);
1291 }
1292 else
1293 {
1294 //make all sliders, like we used to, so that the controls can load correctly
1295 for (auto& parameter : mParameterSliders)
1296 {
1297 if (parameter.mSlider == nullptr)
1298 parameter.MakeSlider();
1299 }
1300 }
1301
1302 IDrawableModule::LoadState(in, rev);
1303
1304 if (ModularSynth::sLoadingFileSaveStateRev < 423)
1305 in >> rev;
1306 LoadStateValidate(rev <= GetModuleSaveStateRev());
1307
1308 if (rev < 3)
1309 LoadVSTFromSaveData(in, rev);
1310}
1311
1312void VSTPlugin::LoadVSTFromSaveData(FileStreamIn& in, int rev)
1313{

Callers

nothing calls this directly

Calls 2

LoadStateValidateFunction · 0.85
MakeSliderMethod · 0.80

Tested by

no test coverage detected