summaryrefslogtreecommitdiffstats
path: root/src/server/LV2Node.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/LV2Node.cpp')
-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;