diff options
author | David Robillard <d@drobilla.net> | 2008-08-17 01:34:53 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-08-17 01:34:53 +0000 |
commit | 694b31089c8060fc6b908b146b12c0e340d004c7 (patch) | |
tree | 48b0e0195de5e7b297e65be15eda35639585ef8a /src/libs/serialisation | |
parent | 3dc90cc95df35e5c786857336f22856c6373b00f (diff) | |
download | ingen-694b31089c8060fc6b908b146b12c0e340d004c7.tar.gz ingen-694b31089c8060fc6b908b146b12c0e340d004c7.tar.bz2 ingen-694b31089c8060fc6b908b146b12c0e340d004c7.zip |
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
Diffstat (limited to 'src/libs/serialisation')
-rw-r--r-- | src/libs/serialisation/Loader.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
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"]; |