Hi Jules,
could you please implement this function?
( I need to know which connections getting illegal after input/output-plugin channel configuration changed, … )
void AudioProcessorGraph::getIllegalConnectionsCopy(Array<AudioProcessorGraph::Connection> &illegalConnections)
{
for (int i = connections.size(); --i >= 0;)
{
const Connection* const c = connections.getUnchecked(i);
const Node* const source = getNodeForId (c->sourceNodeId);
const Node* const dest = getNodeForId (c->destNodeId);
if (source == nullptr || dest == nullptr
|| (c->sourceChannelIndex != midiChannelIndex
&& ! isPositiveAndBelow (c->sourceChannelIndex, source->processor->getNumOutputChannels()))
|| (c->sourceChannelIndex == midiChannelIndex
&& ! source->processor->producesMidi())
|| (c->destChannelIndex != midiChannelIndex
&& ! isPositiveAndBelow (c->destChannelIndex, dest->processor->getNumInputChannels()))
|| (c->destChannelIndex == midiChannelIndex
&& ! dest->processor->acceptsMidi()))
{
illegalConnections.add(Connection(c->sourceFilterID,c->sourceFilterChannel,c->destFilterID,c->destFilterChannel));
}
}
}