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

Method GetDefaultPreset

libraries/lib-effects/EffectManager.cpp:175–203  ·  view source on GitHub ↗

This function is used only in the macro programming user interface

Source from the content-addressed store, hash-verified

173
174// This function is used only in the macro programming user interface
175wxString EffectManager::GetDefaultPreset(const PluginID & ID)
176{
177 auto effect = GetEffect(ID);
178
179 if (!effect)
180 {
181 return wxEmptyString;
182 }
183
184 wxString preset;
185 if (HasCurrentSettings(*effect))
186 {
187 preset = EffectPlugin::kCurrentSettingsIdent;
188 }
189 else if (HasFactoryDefaults(*effect))
190 {
191 preset = EffectPlugin::kFactoryDefaultsIdent;
192 }
193
194 if (!preset.empty())
195 {
196 CommandParameters eap;
197
198 eap.Write(wxT("Use Preset"), preset);
199 eap.GetParameters(preset);
200 }
201
202 return preset;
203}
204
205EffectPlugin* EffectManager::GetEffect(const PluginID& ID)
206{

Callers 2

OnItemSelectedMethod · 0.80
GetEffectParametersMethod · 0.80

Calls 6

GetEffectFunction · 0.85
HasCurrentSettingsFunction · 0.85
HasFactoryDefaultsFunction · 0.85
emptyMethod · 0.45
WriteMethod · 0.45
GetParametersMethod · 0.45

Tested by

no test coverage detected