From 58eae8137000f5f8c319a376fd5362004e6d5adf Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Wed, 19 Jun 2013 15:30:04 -0700 Subject: Initialise ooura struct with right amount of memory for ooura FFT. Fixes #11 --- src/init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/init.c b/src/init.c index ae1301d..10c5535 100644 --- a/src/init.c +++ b/src/init.c @@ -43,8 +43,8 @@ #ifdef USE_OOURA void xtract_init_ooura_data(xtract_ooura_data *ooura_data, unsigned int N) { - ooura_data->ooura_ip = (int *)calloc((2 + sqrt(N)), sizeof(int)); - ooura_data->ooura_w = (double *)calloc((N - 1), sizeof(double)); + ooura_data->ooura_ip = (int *)calloc(2 + sqrt(N), sizeof(int)); + ooura_data->ooura_w = (double *)calloc(N * 5 / 4, sizeof(double)); ooura_data->initialised = true; } -- cgit v1.2.3