| 181 | } |
| 182 | |
| 183 | void NeuralNoteAudioProcessor::_updateValueTree(const ValueTree& inNewState) |
| 184 | { |
| 185 | jassert(inNewState.getType() == NnId::NeuralNoteStateId); |
| 186 | jassert(mValueTree.getNumProperties() == static_cast<int>(NnId::OrderedStatePropertiesWithDefault.size())); |
| 187 | |
| 188 | if (inNewState.isValid()) { |
| 189 | // Set all properties from inNewState to mValueTree, ignoring extra ones if any. |
| 190 | // If less, missing properties will be left as is. |
| 191 | for (const auto& [prop_id, default_val]: NnId::OrderedStatePropertiesWithDefault) { |
| 192 | if (inNewState.hasProperty(prop_id)) { |
| 193 | mValueTree.setProperty(prop_id, inNewState.getProperty(prop_id), nullptr); |
| 194 | } |
| 195 | } |
| 196 | } else { |
| 197 | jassertfalse; |
| 198 | } |
| 199 | } |
| 200 | |
| 201 | AudioProcessor* JUCE_CALLTYPE createPluginFilter() |
| 202 | { |
nothing calls this directly
no outgoing calls
no test coverage detected