aboutsummaryrefslogtreecommitdiffstats
path: root/src/masher.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-08-01 19:44:09 -0400
committerDavid Robillard <d@drobilla.net>2016-08-01 19:44:09 -0400
commitf1ed0955cb9f4c1279352b5a9d369b93175ff737 (patch)
treee99d0f8690ceb8dbad088b51c6ff9ed8a8e6db39 /src/masher.c
parent8a00872910463f16d8914cee1d9fcdde9ab339f7 (diff)
Check for posix_memalign
Diffstat (limited to 'src/masher.c')
-rw-r--r--src/masher.c5
1 files changed, 4 insertions, 1 deletions
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;
}
}