summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/ObjectSender.cpp15
-rw-r--r--src/libs/engine/Patch.cpp4
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp14
3 files changed, 22 insertions, 11 deletions
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index 872c8d92..8a5fc367 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -57,14 +57,11 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch)
send_node(client, node);
}
- for (List<Connection*>::const_iterator j = patch->connections().begin();
- j != patch->connections().end(); ++j)
- client->connection((*j)->src_port()->path(), (*j)->dst_port()->path());
-
// Send port information
for (size_t i=0; i < patch->num_ports(); ++i) {
Port* const port = patch->ports().at(i);
-
+ send_port(client, port);
+/*
// Send metadata
const map<string, string>& data = port->metadata();
for (map<string, string>::const_iterator i = data.begin(); i != data.end(); ++i)
@@ -74,7 +71,15 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch)
if (port->type() == DataType::FLOAT && port->buffer_size() == 1)
client->control_change(port->path(),
dynamic_cast<TypedPort<sample>*>(port)->buffer(0)->value_at(0));
+*/
}
+
+
+ // Send connections
+ for (List<Connection*>::const_iterator j = patch->connections().begin();
+ j != patch->connections().end(); ++j)
+ client->connection((*j)->src_port()->path(), (*j)->dst_port()->path());
+
// Send metadata
const map<string, string>& data = patch->metadata();
diff --git a/src/libs/engine/Patch.cpp b/src/libs/engine/Patch.cpp
index 5cfdd6e3..d96e63b5 100644
--- a/src/libs/engine/Patch.cpp
+++ b/src/libs/engine/Patch.cpp
@@ -348,9 +348,11 @@ Patch::remove_port(const Port* port)
Array<Node*>*
Patch::build_process_order() const
{
+ cerr << "*********** BUILDING PROCESS ORDER FOR " << path() << endl;
+
Array<Node*>* const process_order = new Array<Node*>(_nodes.size());
- // FIXME: tweak algorithm so it just ends up like this and save the iteration?
+ // FIXME: tweak algorithm so it just ends up like this and save the cost of iteration?
for (List<Node*>::const_iterator i = _nodes.begin(); i != _nodes.end(); ++i)
(*i)->traversed(false);
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index aedfd881..652fe801 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -178,29 +178,33 @@ TypedConnectionEvent<T>::pre_process()
Node* const src_node = m_src_port->parent_node();
Node* const dst_node = m_dst_port->parent_node();
+ // Connection to a patch port from inside the patch
if (src_node->parent_patch() != dst_node->parent_patch()) {
- // Connection to a patch port from inside the patch
+
assert(src_node->parent() == dst_node || dst_node->parent() == src_node);
if (src_node->parent() == dst_node)
m_patch = dynamic_cast<Patch*>(dst_node);
else
m_patch = dynamic_cast<Patch*>(src_node);
+
+ // Connection from a patch input to a patch output (pass through)
+ } else if (src_node == dst_node && dynamic_cast<Patch*>(src_node)) {
+ m_patch = dynamic_cast<Patch*>(src_node);
+
+ // Normal connection between nodes with the same parent
} else {
- // Normal connection between nodes with the same parent
m_patch = src_node->parent_patch();
}
assert(m_patch);
if (src_node == NULL || dst_node == NULL) {
- cerr << "ERR 1\n";
m_succeeded = false;
QueuedEvent::pre_process();
return;
}
- if (src_node->parent() != m_patch && dst_node->parent() != m_patch) {
- cerr << "ERR 2\n";
+ if (m_patch != src_node && src_node->parent() != m_patch && dst_node->parent() != m_patch) {
m_succeeded = false;
QueuedEvent::pre_process();
return;