From f1ed0955cb9f4c1279352b5a9d369b93175ff737 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 1 Aug 2016 19:44:09 -0400 Subject: Check for posix_memalign --- src/masher.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/masher.c b/src/masher.c index 6d501c5..0a9eeda 100644 --- a/src/masher.c +++ b/src/masher.c @@ -88,8 +88,11 @@ activate(LV2_Handle instance) plugin->write_grain = 0; for (i=0; i < GRAINSTORE_SIZE; ++i) { - //plugin->grain_store[i].data = (float*)calloc(MAX_GRAIN_SIZE, sizeof(float)); +#ifdef HAVE_POSIX_MEMALIGN posix_memalign((void**)&plugin->grain_store[i].data, 16, MAX_GRAIN_SIZE * sizeof(float)); +#else + plugin->grain_store[i].data = (float*)calloc(MAX_GRAIN_SIZE, sizeof(float)); +#endif plugin->grain_store[i].length = 0; } } -- cgit v1.2.1