From e7b2f7ee286350bc3bb56b44ed98e4d8bf49af82 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 13 Dec 2016 20:53:58 -0500 Subject: Fix real-time issues with buffer allocation --- src/server/Buffer.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/server/Buffer.hpp') diff --git a/src/server/Buffer.hpp b/src/server/Buffer.hpp index d60365f2..6404479b 100644 --- a/src/server/Buffer.hpp +++ b/src/server/Buffer.hpp @@ -64,7 +64,12 @@ public: return is_audio() ? _capacity : sizeof(LV2_Atom) + get()->size; } - void set_type(LV2_URID type, LV2_URID value_type); + typedef BufferRef (BufferFactory::*GetFn)(LV2_URID, LV2_URID, uint32_t); + + /** Set the buffer type and optional value type for this buffer. + * @param get Called to get auxiliary buffers if necessary. + */ + void set_type(GetFn get, LV2_URID type, LV2_URID value_type); inline bool is_audio() const { return _type == _factory.uris().atom_Sound; -- cgit v1.2.1