From 85e5ce6b18c595875618cb7582c2040bd6260f3d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 22 Jan 2013 05:29:18 +0000 Subject: Support directly passing any type of atom to plugin UIs. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5006 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/NodeModule.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/gui') diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 77ec41ca..bbafa44f 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -168,16 +168,7 @@ NodeModule::value_changed(uint32_t index, const Raul::Atom& value) if (!_plugin_ui) return; - float float_val = 0.0f; - const URIs& uris = app().uris(); - - if (value.type() == uris.forge.Float) { - float_val = value.get_float(); - _plugin_ui->port_event(index, 4, 0, &float_val); - } else if (value.type() == uris.forge.String) { - _plugin_ui->port_event( - index, strlen(value.get_string()), 0, value.get_string()); - } + _plugin_ui->port_event(index, value.size(), value.type(), value.get_body()); } void -- cgit v1.2.1