From 4e736d0b31c56a7ab397c7399b3a53f726466c78 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 9 Jun 2008 17:21:44 +0000 Subject: Bump liblo dependency to 0.24. Bundleify communications where order is relevant (fixes 'random' issues like node positions being off, ticket #89, etc). git-svn-id: http://svn.drobilla.net/lad/ingen@1248 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/ObjectSender.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/libs/engine/ObjectSender.cpp') diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp index f51f0ad0..fff2a797 100644 --- a/src/libs/engine/ObjectSender.cpp +++ b/src/libs/engine/ObjectSender.cpp @@ -33,9 +33,21 @@ namespace Ingen { void ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool recursive) { + client->bundle_begin(); + client->new_patch(patch->path(), patch->internal_polyphony()); client->polyphonic(patch->path(), patch->polyphonic()); + // Send variable + const GraphObjectImpl::Variables& data = patch->variables(); + for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) + client->variable_change(patch->path(), (*j).first, (*j).second); + + if (patch->enabled()) + client->patch_enabled(patch->path()); + + client->bundle_end(); + if (recursive) { // Send nodes @@ -60,14 +72,6 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r client->connection((*j)->src_port_path(), (*j)->dst_port_path()); } - - // Send variable - const GraphObjectImpl::Variables& data = patch->variables(); - for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j) - client->variable_change(patch->path(), (*j).first, (*j).second); - - if (patch->enabled()) - client->patch_enabled(patch->path()); } -- cgit v1.2.1