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

Method GetEffectParameters

src/EffectAndCommandPluginManager.cpp:169–207  ·  view source on GitHub ↗

This function is used only in the macro programming user interface

Source from the content-addressed store, hash-verified

167
168// This function is used only in the macro programming user interface
169wxString EffectAndCommandPluginManager::GetEffectParameters(const PluginID& ID)
170{
171 auto pair = EffectManager::Get().GetEffectAndDefaultSettings(ID);
172 if (auto effect = pair.first)
173 {
174 assert(pair.second); // postcondition
175 wxString parms;
176
177 effect->SaveSettingsAsString(*pair.second, parms);
178
179 // Some effects don't have automatable parameters and will not return
180 // anything, so try to get the active preset (current or factory).
181 if (parms.empty())
182 {
183 parms = EffectManager::Get().GetDefaultPreset(ID);
184 }
185
186 return parms;
187 }
188
189 AudacityCommand* command = GetAudacityCommand(ID);
190
191 if (command)
192 {
193 wxString parms;
194
195 command->SaveSettingsAsString(parms);
196
197 // Some effects don't have automatable parameters and will not return
198 // anything, so try to get the active preset (current or factory).
199 if (parms.empty())
200 {
201 parms = EffectManager::Get().GetDefaultPreset(ID);
202 }
203
204 return parms;
205 }
206 return wxEmptyString;
207}
208
209// This function is used only in the macro programming user interface
210bool EffectAndCommandPluginManager::SetEffectParameters(

Callers 2

GetCurrentParamsForMethod · 0.80
PromptForParamsForMethod · 0.80

Calls 5

GetFunction · 0.85
GetDefaultPresetMethod · 0.80
SaveSettingsAsStringMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected