mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-07 04:10:08 +00:00
Add ability to remove a AudioGraph's node by it's pointer
This commit is contained in:
parent
7ee4c800a9
commit
84bc58f0c3
2 changed files with 15 additions and 0 deletions
|
|
@ -1126,6 +1126,15 @@ bool AudioProcessorGraph::removeNode (const uint32 nodeId)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool AudioProcessorGraph::removeNode (Node* node)
|
||||
{
|
||||
if (node != nullptr)
|
||||
return removeNode (node->nodeId);
|
||||
|
||||
jassertfalse;
|
||||
return false;
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
const AudioProcessorGraph::Connection* AudioProcessorGraph::getConnectionBetween (const uint32 sourceNodeId,
|
||||
const int sourceChannelIndex,
|
||||
|
|
|
|||
|
|
@ -183,6 +183,12 @@ public:
|
|||
*/
|
||||
bool removeNode (uint32 nodeId);
|
||||
|
||||
/** Deletes a node within the graph which has the specified ID.
|
||||
|
||||
This will also delete any connections that are attached to this node.
|
||||
*/
|
||||
bool removeNode (Node* node);
|
||||
|
||||
//==============================================================================
|
||||
/** Returns the number of connections in the graph. */
|
||||
int getNumConnections() const { return connections.size(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue