summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/Patch.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-01-06 04:16:26 +0000
committerDavid Robillard <d@drobilla.net>2007-01-06 04:16:26 +0000
commit2122a857662203936a04a39df7d0e1ad1db82853 (patch)
treeb31070a9d01ab20da1a03bf8d029dc3ce6ab66bc /src/libs/engine/Patch.cpp
parent9c5f7e9dc2029f97d0baf622165701e7c124b25e (diff)
downloadingen-2122a857662203936a04a39df7d0e1ad1db82853.tar.gz
ingen-2122a857662203936a04a39df7d0e1ad1db82853.tar.bz2
ingen-2122a857662203936a04a39df7d0e1ad1db82853.zip
Work on Port destruction (still broken).
git-svn-id: http://svn.drobilla.net/lad/ingen@233 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/Patch.cpp')
-rw-r--r--src/libs/engine/Patch.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp
index 967623e5..d1d3e84a 100644
--- a/src/libs/engine/Patch.cpp
+++ b/src/libs/engine/Patch.cpp
@@ -188,6 +188,9 @@ Patch::add_node(ListNode<Node*>* ln)
}
+/** Remove a node.
+ * Realtime Safe. Preprocessing thread.
+ */
ListNode<Node*>*
Patch::remove_node(const string& name)
{
@@ -263,15 +266,16 @@ Patch::create_port(const string& name, DataType type, size_t buffer_size, bool i
}
-/** Remove a port. Realtime safe.
+/** Remove a port.
+ * Realtime safe. Preprocessing thread.
*/
ListNode<Port*>*
-Patch::remove_port(const Port* port)
+Patch::remove_port(const string& name)
{
bool found = false;
ListNode<Port*>* ret = NULL;
for (List<Port*>::iterator i = _input_ports.begin(); i != _input_ports.end(); ++i) {
- if ((*i) == port) {
+ if ((*i)->name() == name) {
ret = _input_ports.remove(i);
found = true;
}
@@ -279,7 +283,7 @@ Patch::remove_port(const Port* port)
if (!found)
for (List<Port*>::iterator i = _output_ports.begin(); i != _output_ports.end(); ++i) {
- if ((*i) == port) {
+ if ((*i)->name() == name) {
ret = _output_ports.remove(i);
found = true;
}
@@ -305,7 +309,7 @@ Patch::remove_port(const Port* port)
Array<Node*>*
Patch::build_process_order() const
{
- //cerr << "*********** BUILDING PROCESS ORDER FOR " << path() << endl;
+ cerr << "*********** Building process order for " << path() << endl;
Array<Node*>* const process_order = new Array<Node*>(_nodes.size(), NULL);