MCPcopy Create free account
hub / github.com/DamRsn/NeuralNote / _updateValueTree

Method _updateValueTree

NeuralNote/PluginSources/PluginProcessor.cpp:183–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void 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
201AudioProcessor* JUCE_CALLTYPE createPluginFilter()
202{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected