From 73f6522b1c60286d35aa64739664273119fb6eb3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 17 Dec 2013 04:57:59 +0000 Subject: 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 --- src/server/BufferFactory.hpp | 2 +- src/server/LV2Block.cpp | 3 +++ src/server/PortImpl.cpp | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') 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 -- cgit v1.2.1