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

Method ForEachParameter

libraries/lib-vst/VSTWrapper.cpp:1688–1712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1686}
1687
1688void VSTWrapper::ForEachParameter(ParameterVisitor visitor) const
1689{
1690 for (int i = 0; i < mAEffect->numParams; i++)
1691 {
1692 wxString name = GetString(effGetParamName, i);
1693 if (name.empty())
1694 {
1695 name.Printf(wxT("parm_%d"), i);
1696 }
1697 else
1698 /* Easy fix for now for issue 3854, but this should be reconsidered
1699 There is the possibility that two parameter names might collide
1700 after normalizing. A question is whether the normalizing was ever
1701 really needed for saving in a wxConfigFile. Maybe not. But then
1702 redefinition of the keys stored in the file may introduce versioning
1703 difficulties if there is an attempt to fix this in future Audacity.
1704 */
1705 name = CommandParameters::NormalizeName(name);
1706
1707 ParameterInfo pi{ i, name };
1708
1709 if (!visitor(pi))
1710 break;
1711 }
1712}
1713
1714bool VSTWrapper::FetchSettings(VSTSettings& vstSettings, bool doFetch) const
1715{

Callers 2

VSTEditorMethod · 0.45

Calls 3

GetStringFunction · 0.85
NormalizeNameFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected