Mercurial > hg > libxtract
diff src/init.c @ 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 | 1a0907add40c |
children | 5176462e2797 |
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; }