summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-12-17 04:57:59 +0000
committerDavid Robillard <d@drobilla.net>2013-12-17 04:57:59 +0000
commit73f6522b1c60286d35aa64739664273119fb6eb3 (patch)
tree9304f13ed176c41695c2c822144c906ee29b7260 /src
parentcac1263b0bec8a368b28c0a47e4bbb18f1aae958 (diff)
downloadingen-73f6522b1c60286d35aa64739664273119fb6eb3.tar.gz
ingen-73f6522b1c60286d35aa64739664273119fb6eb3.tar.bz2
ingen-73f6522b1c60286d35aa64739664273119fb6eb3.zip
Fix atom vector communication (patch from Robin Gareus, #941).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5175 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/server/BufferFactory.hpp2
-rw-r--r--src/server/LV2Block.cpp3
-rw-r--r--src/server/PortImpl.cpp4
3 files changed, 6 insertions, 3 deletions
diff --git a/src/server/BufferFactory.hpp b/src/server/BufferFactory.hpp
index b3740bd0..54c02c77 100644
--- a/src/server/BufferFactory.hpp
+++ b/src/server/BufferFactory.hpp
@@ -55,7 +55,7 @@ public:
BufferRef silent_buffer();
void set_block_length(SampleCount block_length);
- void set_seq_size(uint32_t seq_size);
+ void set_seq_size(uint32_t seq_size) { _seq_size = seq_size; }
Forge& forge();
URIs& uris() { return _uris; }
diff --git a/src/server/LV2Block.cpp b/src/server/LV2Block.cpp
index 73a74daa..7b1dc3f3 100644
--- a/src/server/LV2Block.cpp
+++ b/src/server/LV2Block.cpp
@@ -219,6 +219,7 @@ LV2Block::instantiate(BufferFactory& bufs)
float* max_values = new float[num_ports];
float* def_values = new float[num_ports];
lilv_plugin_get_port_ranges_float(plug, min_values, max_values, def_values);
+ uint32_t max_sequence_size = 0;
// Get all the necessary information about ports
for (uint32_t j = 0; j < num_ports; ++j) {
@@ -322,6 +323,8 @@ LV2Block::instantiate(BufferFactory& bufs)
}
}
lilv_nodes_free(sizes);
+ max_sequence_size = std::max(port_buffer_size, max_sequence_size);
+ bufs.set_seq_size(max_sequence_size);
}
enum { UNKNOWN, INPUT, OUTPUT } direction = UNKNOWN;
diff --git a/src/server/PortImpl.cpp b/src/server/PortImpl.cpp
index 0fc73649..e5a91b32 100644
--- a/src/server/PortImpl.cpp
+++ b/src/server/PortImpl.cpp
@@ -33,7 +33,7 @@ using namespace std;
namespace Ingen {
namespace Server {
-static const uint32_t monitor_rate = 10.0; // Hz
+static const uint32_t monitor_rate = 25.0; // Hz
/** The length of time between monitor updates in frames */
static inline uint32_t
@@ -119,7 +119,7 @@ PortImpl::set_type(PortType port_type, LV2_URID buffer_type)
break;
}
}
- _buffer_size = _bufs.default_size(_buffer_type);
+ _buffer_size = std::max(_buffer_size, _bufs.default_size(_buffer_type));
}
bool