Пример #1
0
void AudioProcessorValueTreeState::updateParameterConnectionsToChildTrees()
{
    ScopedLock lock (valueTreeChanging);

    for (auto* param : processor.getParameters())
    {
        jassert (dynamic_cast<Parameter*> (param) != nullptr);
        auto* p = static_cast<Parameter*> (param);

        p->setNewState (getOrCreateChildValueTree (p->paramID));
    }
}
void ZenAudioProcessorValueTreeState::updateParameterConnectionsToChildTrees()
{
	if (!updatingConnections)
	{
		ScopedValueSetter<bool> svs(updatingConnections, true, false);

		const int numParams = processor.getParameters().size();

		for (int i = 0; i < numParams; ++i)
		{
			AudioProcessorParameter* const ap = processor.getParameters().getUnchecked(i);
			jassert(dynamic_cast<ZenParameter*> (ap) != nullptr);

			ZenParameter* p = static_cast<ZenParameter*> (ap);
			p->setNewState(getOrCreateChildValueTree(p->paramID));
		}
	}
}
Пример #3
0
void AudioProcessorValueTreeState::valueTreeChildRemoved (ValueTree& parent, ValueTree& tree, int)
{
    if (parent == state && tree.hasType (valueType))
        if (auto* param = Parameter::getParameterForID (processor, tree.getProperty (idPropertyID).toString()))
            param->setNewState (getOrCreateChildValueTree (param->paramID));
}