From e8faf2f2adeb9066de3c968a57803bb262f61ee1 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Tue, 18 Jan 2022 18:57:06 +0000 Subject: buflib: add a common dummy callbacks struct & use it There are various allocations that can't be moved or shrunk. Provide a global callback struct for this use case instead of making each caller declare its own dummy struct. Also fixed ROLO and x1000 installer code which incorrectly used movable allocations. Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1 --- apps/plugin.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'apps/plugin.c') diff --git a/apps/plugin.c b/apps/plugin.c index aa69b9ca03..8434fea07d 100644 --- a/apps/plugin.c +++ b/apps/plugin.c @@ -990,14 +990,11 @@ void* plugin_get_buffer(size_t *buffer_size) */ static void* plugin_get_audio_buffer(size_t *buffer_size) { - /* dummy ops with no callbacks, needed because by - * default buflib buffers can be moved around which must be avoided */ - static struct buflib_callbacks dummy_ops; if (plugin_buffer_handle <= 0) { plugin_buffer_handle = core_alloc_maximum("plugin audio buf", &plugin_buffer_size, - &dummy_ops); + &buflib_ops_locked); } if (buffer_size) -- cgit v1.2.3