summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/OSCClientSender.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-19 21:16:18 +0000
committerDavid Robillard <d@drobilla.net>2007-09-19 21:16:18 +0000
commit0b8415c61e321d032d62b5b1cbda65bab6f178d7 (patch)
tree7ed101634641999660e697cf2e6a5f1415b9b438 /src/libs/engine/OSCClientSender.cpp
parenta054212abbdb26e03ca42c91d0c86819d445bc5f (diff)
downloadingen-0b8415c61e321d032d62b5b1cbda65bab6f178d7.tar.gz
ingen-0b8415c61e321d032d62b5b1cbda65bab6f178d7.tar.bz2
ingen-0b8415c61e321d032d62b5b1cbda65bab6f178d7.zip
Tidy up OSC namespace to use OSC true/false instead of C style boolean integers.
Fully separate concept of "polyphonic" (boolean node property) from "polyphony" (integer patch/node property). Ability to add "polyphonic" nodes to poly=1 patches (in case poly is changed later). git-svn-id: http://svn.drobilla.net/lad/ingen@732 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/OSCClientSender.cpp')
-rw-r--r--src/libs/engine/OSCClientSender.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp
index 2bcd8282..75353981 100644
--- a/src/libs/engine/OSCClientSender.cpp
+++ b/src/libs/engine/OSCClientSender.cpp
@@ -244,7 +244,7 @@ OSCClientSender::plugins()
* <p> \b /ingen/new_node - Notification of a new node's creation.
* \arg \b plug-uri (const std::string&) - URI of the plugin new node is an instance of
* \arg \b path (const std::string&) - Path of the new node
- * \arg \b polyphonic (integer-boolean) - Node is polyphonic (1 = yes, 0 = no)
+ * \arg \b polyphonic (boolean) - Node is polyphonic
* \arg \b num-ports (integer) - Number of ports (number of new_port messages to expect)\n\n
* \li New nodes are sent as a bundle. The first message in the bundle will be
* this one (/ingen/new_node), followed by a series of /ingen/new_port commands,
@@ -260,8 +260,12 @@ void OSCClientSender::new_node(const std::string& plugin_uri,
//cerr << "Sending node " << node_path << endl;
- lo_send(_address, "/ingen/new_node", "ssii", plugin_uri.c_str(),
- node_path.c_str(), is_polyphonic ? 1 : 0, num_ports);
+ if (is_polyphonic)
+ lo_send(_address, "/ingen/new_node", "ssTi", plugin_uri.c_str(),
+ node_path.c_str(), num_ports);
+ else
+ lo_send(_address, "/ingen/new_node", "ssFi", plugin_uri.c_str(),
+ node_path.c_str(), num_ports);
#if 0
/*
lo_timetag tt;