Skip to content
Snippets Groups Projects
Commit 3fed3d36 authored by jsiegle's avatar jsiegle
Browse files

Fix issue with clearing audio connections in ProcessorGraph

parent 20f116dc
No related branches found
No related tags found
No related merge requests found
...@@ -98,23 +98,6 @@ void ProcessorGraph::createDefaultNodes() ...@@ -98,23 +98,6 @@ void ProcessorGraph::createDefaultNodes()
addNode(an, AUDIO_NODE_ID); addNode(an, AUDIO_NODE_ID);
addNode(arn, RESAMPLING_NODE_ID); addNode(arn, RESAMPLING_NODE_ID);
// connect audio subnetwork
for (int n = 0; n < 2; n++)
{
addConnection(AUDIO_NODE_ID, n,
RESAMPLING_NODE_ID, n);
addConnection(RESAMPLING_NODE_ID, n,
OUTPUT_NODE_ID, n);
}
addConnection(AUDIO_NODE_ID, midiChannelIndex,
RESAMPLING_NODE_ID, midiChannelIndex);
//std::cout << "Default nodes created." << std::endl;
} }
void ProcessorGraph::updatePointers() void ProcessorGraph::updatePointers()
...@@ -255,11 +238,18 @@ void ProcessorGraph::clearConnections() ...@@ -255,11 +238,18 @@ void ProcessorGraph::clearConnections()
for (int i = 0; i < getNumNodes(); i++) for (int i = 0; i < getNumNodes(); i++)
{ {
Node* node = getNode(i); Node* node = getNode(i);
int nodeId = node->nodeId;
if (node->nodeId != OUTPUT_NODE_ID) if (nodeId != OUTPUT_NODE_ID &&
nodeId != RESAMPLING_NODE_ID)
{ {
disconnectNode(node->nodeId);
GenericProcessor* p =(GenericProcessor*) node->getProcessor(); if (nodeId != RECORD_NODE_ID && nodeId != AUDIO_NODE_ID)
{
disconnectNode(node->nodeId);
}
GenericProcessor* p = (GenericProcessor*) node->getProcessor();
p->resetConnections(); p->resetConnections();
} }
...@@ -391,13 +381,7 @@ void ProcessorGraph::updateConnections(Array<SignalChainTabButton*, CriticalSect ...@@ -391,13 +381,7 @@ void ProcessorGraph::updateConnections(Array<SignalChainTabButton*, CriticalSect
newSource->setPathToProcessor(source); newSource->setPathToProcessor(source);
source = newSource; source = newSource;
} }
// source = splitters.getFirst()->getSourceNode(); // dest is now the splitter
//splitters.remove(0); // take it out of the array
//dest->switchIO(1); // switch to the other destination
//dest->wasConnected = true; // don't want to re-add splitter
// source = dest->getSourceNode(); // splitter is now source
} }
} // end while source != 0 } // end while source != 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment