summaryrefslogtreecommitdiffstats
path: root/src/server
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-13 18:40:19 +0000
committerDavid Robillard <d@drobilla.net>2012-05-13 18:40:19 +0000
commit6b9f18ad7d08a6ca1a38de7dc98529bcb9e17b43 (patch)
tree5a6660437d95403b125d3998b4004bcc5f6e8348 /src/server
parentb1f2f7b57848ca84d9d4230e7f9a875831b549e7 (diff)
downloadingen-6b9f18ad7d08a6ca1a38de7dc98529bcb9e17b43.tar.gz
ingen-6b9f18ad7d08a6ca1a38de7dc98529bcb9e17b43.tar.bz2
ingen-6b9f18ad7d08a6ca1a38de7dc98529bcb9e17b43.zip
Sanify atom port buffer size stuff (fix dead assignment).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4386 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server')
-rw-r--r--src/server/LV2Node.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/server/LV2Node.cpp b/src/server/LV2Node.cpp
index d1b99949..3ecbb456 100644
--- a/src/server/LV2Node.cpp
+++ b/src/server/LV2Node.cpp
@@ -259,10 +259,10 @@ LV2Node::instantiate(BufferFactory& bufs)
LILV_FOREACH(nodes, i, defaults) {
const LilvNode* d = lilv_nodes_get(defaults, i);
if (lilv_node_is_string(d)) {
- const char* str_val = lilv_node_as_string(d);
- const size_t str_val_len = strlen(str_val);
+ const char* str_val = lilv_node_as_string(d);
+ const uint32_t str_val_len = strlen(str_val);
val = forge.alloc(str_val);
- port_buffer_size = str_val_len;
+ port_buffer_size = std::max(port_buffer_size, str_val_len);
}
}
@@ -271,12 +271,13 @@ LV2Node::instantiate(BufferFactory& bufs)
LILV_FOREACH(nodes, i, sizes) {
const LilvNode* d = lilv_nodes_get(sizes, i);
if (lilv_node_is_int(d)) {
- size_t size_val = lilv_node_as_int(d);
- port_buffer_size = size_val;
- Raul::info << "Atom port " << path() << " buffer size "
- << port_buffer_size << std::endl;
+ uint32_t size_val = lilv_node_as_int(d);
+ port_buffer_size = std::max(port_buffer_size, size_val);
}
}
+
+ Raul::info << "Atom port " << path() << " buffer size "
+ << port_buffer_size << std::endl;
}
enum { UNKNOWN, INPUT, OUTPUT } direction = UNKNOWN;