From 694b31089c8060fc6b908b146b12c0e340d004c7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 17 Aug 2008 01:34:53 +0000 Subject: Cloooser... Bundling of OSC communication both ways (previous was just engine->client). Factor out common OSC*Sender functionality (bundling stuff). Fully type-safe and polyphony-aware port value setting/getting, from RDF through OSC through engine and back again. git-svn-id: http://svn.drobilla.net/lad/ingen@1409 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/serialisation/Loader.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/libs/serialisation/Loader.cpp') diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp index ec06d0bc..bb085d57 100644 --- a/src/libs/serialisation/Loader.cpp +++ b/src/libs/serialisation/Loader.cpp @@ -210,13 +210,12 @@ Loader::load(Ingen::Shared::World* world, const string node_name = (*i)["nodename"].to_string(); const string port_name = (*i)["portname"].to_string(); - const float val = (*i)["portval"].to_float(); assert(Path::is_valid_name(node_name)); assert(Path::is_valid_name(port_name)); const Path port_path = patch_path.base() + node_name + "/" + port_name; - world->engine->set_port_value(port_path, "ingen:Float", sizeof(float), &val); + world->engine->set_port_value(port_path, AtomRDF::node_to_atom((*i)["portval"])); } @@ -254,10 +253,7 @@ Loader::load(Ingen::Shared::World* world, } const Redland::Node val_node = (*i)["portval"]; - if (val_node.is_float()) { - const float val = val_node.to_float(); - world->engine->set_port_value(patch_path.base() + name, "ingen:Float", sizeof(float), &val); - } + world->engine->set_port_value(patch_path.base() + name, AtomRDF::node_to_atom(val_node)); const string key = world->rdf_world->prefixes().qualify((*i)["varkey"].to_string()); const Redland::Node var_val_node = (*i)["varval"]; -- cgit v1.2.1