| 76 | }; |
| 77 | |
| 78 | std::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 | |
| 101 | wxString ParametersToString(const std::map<Steinberg::Vst::ParamID, Steinberg::Vst::ParamValue>& params) |
| 102 | { |
no test coverage detected