summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/ObjectSender.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-04 03:58:49 +0000
committerDavid Robillard <d@drobilla.net>2007-07-04 03:58:49 +0000
commit417623b0033b12969e4e84c61c21922d4ab7f534 (patch)
treed6ac7058406e42a6e6b894cefaaa60bccee5d987 /src/libs/engine/ObjectSender.cpp
parentbb79ba74ab813c3126ad905e6453dae56b6192bc (diff)
downloadingen-417623b0033b12969e4e84c61c21922d4ab7f534.tar.gz
ingen-417623b0033b12969e4e84c61c21922d4ab7f534.tar.bz2
ingen-417623b0033b12969e4e84c61c21922d4ab7f534.zip
Added metadata (ie integer, toggle) to builtin node control ports.
Treat integer/toggle ports as.... integer ports (still with just a slider though). Closes ticket #40. git-svn-id: http://svn.drobilla.net/lad/ingen@571 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/ObjectSender.cpp')
-rw-r--r--src/libs/engine/ObjectSender.cpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index db573afc..608d1768 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -96,29 +96,22 @@ ObjectSender::send_node(ClientInterface* client, const Node* node, bool recursiv
return;
}
- // FIXME: bundleify
- //client->bundle_begin();
+ client->bundle_begin();
- const Raul::Array<Port*>& ports = node->ports();
-
- client->new_node(node->plugin()->uri(), node->path(), polyphonic, ports.size());
+ client->new_node(node->plugin()->uri(), node->path(), polyphonic, node->ports().size());
- if (recursive) {
- // Send ports
- for (size_t j=0; j < ports.size(); ++j) {
- Port* const port = ports.at(j);
- assert(port);
-
- send_port(client, port);
- }
- }
-
// Send metadata
const GraphObject::MetadataMap& data = node->metadata();
for (GraphObject::MetadataMap::const_iterator j = data.begin(); j != data.end(); ++j)
client->metadata_update(node->path(), (*j).first, (*j).second);
- //client->bundle_end();
+ client->bundle_end();
+
+ if (recursive) {
+ // Send ports
+ for (size_t j=0; j < node->ports().size(); ++j)
+ send_port(client, node->ports().at(j));
+ }
}
@@ -142,6 +135,8 @@ ObjectSender::send_port(ClientInterface* client, const Port* port)
//cerr << ", type = " << type << endl;
+ client->bundle_begin();
+
client->new_port(port->path(), type, port->is_output());
// Send control value
@@ -155,6 +150,8 @@ ObjectSender::send_port(ClientInterface* client, const Port* port)
const GraphObject::MetadataMap& data = port->metadata();
for (GraphObject::MetadataMap::const_iterator j = data.begin(); j != data.end(); ++j)
client->metadata_update(port->path(), (*j).first, (*j).second);
+
+ client->bundle_end();
}