| 198 | } |
| 199 | |
| 200 | void Multiband::setParametersToAFromB(int toIndex, int fromIndex) |
| 201 | { |
| 202 | const auto& fromArray = paramsArrays[fromIndex]; |
| 203 | const auto& toArray = paramsArrays[toIndex]; |
| 204 | |
| 205 | for (const auto& param : processor.getParameters()) |
| 206 | { |
| 207 | if (auto* p = dynamic_cast<juce::AudioProcessorParameterWithID*>(param)) |
| 208 | { |
| 209 | juce::String paramFromID = p->getParameterID(); |
| 210 | float paramFromValue = p->getValue(); |
| 211 | |
| 212 | for (size_t i = 0; i < fromArray.size(); ++i) |
| 213 | { |
| 214 | if (fromArray[i] == paramFromID) |
| 215 | { |
| 216 | for (const auto& paramTo : processor.getParameters()) |
| 217 | { |
| 218 | if (auto* pTo = dynamic_cast<juce::AudioProcessorParameterWithID*>(paramTo)) |
| 219 | { |
| 220 | if (toArray[i] == pTo->getParameterID()) |
| 221 | { |
| 222 | pTo->setValueNotifyingHost(paramFromValue); |
| 223 | break; |
| 224 | } |
| 225 | } |
| 226 | } |
| 227 | break; |
| 228 | } |
| 229 | } |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | bool Multiband::isParamInArray(juce::String paramName, const std::vector<juce::String>& paramArray) |
| 235 | { |
nothing calls this directly
no outgoing calls
no test coverage detected