changeset 176:f94410db4014

Initialise ooura struct with right amount of memory for ooura FFT. Fixes #11
author Jamie Bullock <jamie@jamiebullock.com>
date Wed, 19 Jun 2013 15:30:04 -0700
parents 41c02a0e7433
children ea68ff490a71
files src/init.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/init.c	Wed Jun 19 15:15:21 2013 -0700
+++ b/src/init.c	Wed Jun 19 15:30:04 2013 -0700
@@ -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;
 }