MCPcopy Create free account
hub / github.com/audacity/audacity / MigrateOldConfigFile

Method MigrateOldConfigFile

libraries/lib-audio-unit/AudioUnitEffectBase.cpp:387–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

385// ============================================================================
386
387bool AudioUnitEffectBase::MigrateOldConfigFile(
388 const RegistryPath & group, EffectSettings &settings) const
389{
390 // Migration of very old format configuration file, should not normally
391 // happen and perhaps this code can be abandoned
392 // Attempt to load old preset parameters and resave using new method
393 constexpr auto oldKey = L"Parameters";
394 wxString parms;
395 if (GetConfig(*this, PluginSettings::Private,
396 group, oldKey, parms, wxEmptyString)) {
397 CommandParameters eap;
398 if (eap.SetParameters(parms))
399 if (LoadSettings(eap, settings))
400 if (SavePreset(group, GetSettings(settings)))
401 RemoveConfig(*this, PluginSettings::Private, group, oldKey);
402 return true;
403 }
404 return false;
405}
406
407OptionalMessage AudioUnitEffectBase::LoadPreset(
408 const RegistryPath & group, EffectSettings &settings) const

Callers

nothing calls this directly

Calls 4

GetConfigFunction · 0.85
GetSettingsFunction · 0.85
RemoveConfigFunction · 0.85
SetParametersMethod · 0.45

Tested by

no test coverage detected