summaryrefslogtreecommitdiffstats
path: root/src/libs/serialisation
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-09-22 23:51:00 +0000
committerDavid Robillard <d@drobilla.net>2007-09-22 23:51:00 +0000
commitc1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9 (patch)
tree1baf40b7a90bc96c4b0832103ff0cdabdf1ed1a6 /src/libs/serialisation
parent4bd53e016b8bb912e48d77e756720516d876d5c2 (diff)
downloadingen-c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9.tar.gz
ingen-c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9.tar.bz2
ingen-c1160ffc8a5dfb38891b0faa6373c9eecdd8e4c9.zip
Type oblivious set_port_value interface.
git-svn-id: http://svn.drobilla.net/lad/ingen@765 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/serialisation')
-rw-r--r--src/libs/serialisation/Loader.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp
index 9438583a..ec60225d 100644
--- a/src/libs/serialisation/Loader.cpp
+++ b/src/libs/serialisation/Loader.cpp
@@ -205,7 +205,7 @@ Loader::load(SharedPtr<EngineInterface> engine,
const Path port_path = patch_path.base() + node_name +"/"+ port_name;
- engine->set_port_value(port_path, val);
+ engine->set_port_value(port_path, sizeof(float), &val);
}
@@ -240,8 +240,10 @@ Loader::load(SharedPtr<EngineInterface> engine,
}
RDF::Node val_node = (*i)["portval"];
- if (val_node.is_float())
- engine->set_port_value(patch_path.base() + name, val_node.to_float());
+ if (val_node.is_float()) {
+ const float val = val_node.to_float();
+ engine->set_port_value(patch_path.base() + name, sizeof(float), &val);
+ }
string floatkey = rdf_world->qualify((*i)["floatkey"].to_string());
val_node = (*i)["floatval"];