From d1e58b25654ab25607329afacc9a23d829267637 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 14 Nov 2015 19:22:09 -0500 Subject: Fix buffer copying for various types --- src/server/Buffer.hpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/Buffer.hpp') diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp index 11037dd1..aa732781 100644 --- a/src/server/Buffer.hpp +++ b/src/server/Buffer.hpp @@ -60,6 +60,9 @@ public: inline LV2_URID type() const { return _type; } inline LV2_URID value_type() const { return _value_type; } inline uint32_t capacity() const { return _capacity; } + inline uint32_t size() const { + return is_audio() ? _capacity : sizeof(LV2_Atom) + get()->size; + } void set_type(LV2_URID type, LV2_URID value_type); -- cgit v1.2.1