summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/OSCClientReceiver.cpp7
-rw-r--r--src/libs/client/OSCEngineSender.cpp37
2 files changed, 29 insertions, 15 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 058bf006..d223e211 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -156,7 +156,8 @@ OSCClientReceiver::setup_callbacks()
lo_server_thread_add_method(_st, "/ingen/object_renamed", "ss", object_renamed_cb, this);
lo_server_thread_add_method(_st, "/ingen/new_connection", "ss", connection_cb, this);
lo_server_thread_add_method(_st, "/ingen/disconnection", "ss", disconnection_cb, this);
- lo_server_thread_add_method(_st, "/ingen/new_node", "ssii", new_node_cb, this);
+ lo_server_thread_add_method(_st, "/ingen/new_node", "ssTi", new_node_cb, this);
+ lo_server_thread_add_method(_st, "/ingen/new_node", "ssFi", new_node_cb, this);
lo_server_thread_add_method(_st, "/ingen/new_port", "ssi", new_port_cb, this);
lo_server_thread_add_method(_st, "/ingen/metadata_update", NULL, metadata_update_cb, this);
lo_server_thread_add_method(_st, "/ingen/control_change", "sf", control_change_cb, this);
@@ -256,10 +257,10 @@ OSCClientReceiver::_new_node_cb(const char* path, const char* types, lo_arg** ar
{
const char* uri = &argv[0]->s;
const char* node_path = &argv[1]->s;
- const int32_t poly = argv[2]->i;
+ bool polyphonic = (types[2] == 'T');
const int32_t num_ports = argv[3]->i;
- new_node(uri, node_path, poly, num_ports);
+ new_node(uri, node_path, polyphonic, num_ports);
/*_receiving_node_model = new NodeModel(node_path);
_receiving_node_model->polyphonic((poly == 1));
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index 89939b6b..e7b94e48 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -192,11 +192,17 @@ OSCEngineSender::create_node(const string& path,
bool polyphonic)
{
assert(_engine_addr);
- lo_send(_engine_addr, "/ingen/create_node", "issi",
- next_id(),
- path.c_str(),
- plugin_uri.c_str(),
- (polyphonic ? 1 : 0));
+
+ if (polyphonic)
+ lo_send(_engine_addr, "/ingen/create_node", "issT",
+ next_id(),
+ path.c_str(),
+ plugin_uri.c_str());
+ else
+ lo_send(_engine_addr, "/ingen/create_node", "issF",
+ next_id(),
+ path.c_str(),
+ plugin_uri.c_str());
}
@@ -212,13 +218,20 @@ OSCEngineSender::create_node(const string& path,
bool polyphonic)
{
assert(_engine_addr);
- lo_send(_engine_addr, "/ingen/create_node", "issssi",
- next_id(),
- path.c_str(),
- plugin_type.c_str(),
- library_name.c_str(),
- plugin_label.c_str(),
- (polyphonic ? 1 : 0));
+ if (polyphonic)
+ lo_send(_engine_addr, "/ingen/create_node", "issssT",
+ next_id(),
+ path.c_str(),
+ plugin_type.c_str(),
+ library_name.c_str(),
+ plugin_label.c_str());
+ else
+ lo_send(_engine_addr, "/ingen/create_node", "issssF",
+ next_id(),
+ path.c_str(),
+ plugin_type.c_str(),
+ library_name.c_str(),
+ plugin_label.c_str());
}