summaryrefslogtreecommitdiffstats
path: root/src/server/Buffer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/Buffer.hpp')
-rw-r--r--src/server/Buffer.hpp3
1 files changed, 3 insertions, 0 deletions
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<LV2_Atom>()->size;
+ }
void set_type(LV2_URID type, LV2_URID value_type);