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

Function ParametersFromString

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

Source from the content-addressed store, hash-verified

76};
77
78std::map<Steinberg::Vst::ParamID, Steinberg::Vst::ParamValue> ParametersFromString(const wxString& str)
79{
80 std::map<Steinberg::Vst::ParamID, Steinberg::Vst::ParamValue> result;
81 wxStringTokenizer tokenizer(str, ";");
82 while(tokenizer.HasMoreTokens())
83 {
84 auto token = tokenizer.GetNextToken();
85
86 const auto split = token.Find('=');
87 if(split == wxNOT_FOUND)
88 continue;
89
90 unsigned long id;
91 double value;
92 if(!token.Left(split).ToULong(&id) ||
93 !token.Right(token.Length() - split - 1).ToDouble(&value))
94 continue;
95
96 result[id] = value;
97 }
98 return result;
99}
100
101wxString ParametersToString(const std::map<Steinberg::Vst::ParamID, Steinberg::Vst::ParamValue>& params)
102{

Callers 2

LoadSettingsMethod · 0.85
LoadUserPresetMethod · 0.85

Calls 2

LengthMethod · 0.80
FindMethod · 0.45

Tested by

no test coverage detected