From c3dc3ff5a5465ed59b0a8b36eb234130dbf0a9d6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 22 Jun 2006 07:38:52 +0000 Subject: LADSPA port default value loading (engine side) git-svn-id: http://svn.drobilla.net/lad/ingen@77 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/ObjectSender.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/libs/engine/ObjectSender.cpp') 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)->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)->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*>(port)->buffer(0)->value_at(0)); + if (port->type() == DataType::FLOAT && port->buffer_size() == 1) { + sample default_value = dynamic_cast*>( + 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& data = port->metadata(); -- cgit v1.2.1