diff options
author | David Robillard <d@drobilla.net> | 2006-06-22 07:38:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-22 07:38:52 +0000 |
commit | c3dc3ff5a5465ed59b0a8b36eb234130dbf0a9d6 (patch) | |
tree | 15cb79a6c687883d326d1e8861475c0eebc04dfe /src/libs/engine/ObjectSender.cpp | |
parent | 9cde7e0c1097cf0aa52113a942a3b88d930568b6 (diff) | |
download | ingen-c3dc3ff5a5465ed59b0a8b36eb234130dbf0a9d6.tar.gz ingen-c3dc3ff5a5465ed59b0a8b36eb234130dbf0a9d6.tar.bz2 ingen-c3dc3ff5a5465ed59b0a8b36eb234130dbf0a9d6.zip |
LADSPA port default value loading (engine side)
git-svn-id: http://svn.drobilla.net/lad/ingen@77 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/ObjectSender.cpp')
-rw-r--r-- | src/libs/engine/ObjectSender.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index 33f261fb..b79a5df0 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -88,17 +88,6 @@ ObjectSender::send_patch(ClientInterface* client, const Patch* patch) void ObjectSender::send_node(ClientInterface* client, const Node* node) { - // Don't send node notification for bridge nodes, from the client's - // perspective they don't even exist (just the ports they represent) - // FIXME: hack, these nodes probably shouldn't even exist in the - // engine anymore - /*if (const_cast<Node*>(node)->as_port()) { // bridge node if as_port() returns non-NULL - // FIXME: remove this whole thing. shouldn't be any bridge nodes anymore - assert(false); - send_port(client, const_cast<Node*>(node)->as_port()); - return; - }*/ - const Plugin* const plugin = node->plugin(); int polyphonic = @@ -163,9 +152,12 @@ ObjectSender::send_port(ClientInterface* client, const Port* port) client->new_port(port->path(), type, port->is_output()); // Send control value - if (port->type() == DataType::FLOAT && port->buffer_size() == 1) - client->control_change(port->path(), - dynamic_cast<const TypedPort<sample>*>(port)->buffer(0)->value_at(0)); + if (port->type() == DataType::FLOAT && port->buffer_size() == 1) { + sample default_value = dynamic_cast<const TypedPort<sample>*>( + port)->buffer(0)->value_at(0); + cerr << port->path() << " sending default value " << default_value << endl; + client->control_change(port->path(), default_value); + } // Send metadata const map<string, string>& data = port->metadata(); |