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

Method LoadUserPreset

libraries/lib-vst3/VST3Wrapper.cpp:1067–1086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1065}
1066
1067OptionalMessage VST3Wrapper::LoadUserPreset(
1068 const EffectDefinitionInterface& effect, const RegistryPath& name, EffectSettings& settings)
1069{
1070 VST3EffectSettings vst3settings;
1071
1072 wxString processorStateStr;
1073 if(GetConfig(effect, PluginSettings::Private, name, processorStateKey, processorStateStr, wxEmptyString))
1074 {
1075 vst3settings.processorState = processorStateStr;
1076 wxString controllerStateStr;
1077 if(GetConfig(effect, PluginSettings::Private, name, controllerStateKey, controllerStateStr, wxEmptyString))
1078 vst3settings.controllerState = controllerStateStr;
1079 }
1080 wxString parametersStr;
1081 if(GetConfig(effect, PluginSettings::Private, name, parametersKey, parametersStr, wxEmptyString))
1082 vst3settings.parameterChanges = ParametersFromString(parametersStr);
1083
1084 std::swap(vst3settings, GetSettings(settings));
1085 return { nullptr };
1086}
1087
1088void VST3Wrapper::SaveUserPreset(const EffectDefinitionInterface& effect, const RegistryPath& name, const EffectSettings& settings)
1089{

Callers

nothing calls this directly

Calls 4

GetConfigFunction · 0.85
ParametersFromStringFunction · 0.85
GetSettingsFunction · 0.85
swapFunction · 0.50

Tested by

no test coverage detected