Mercurial > hg > libxtract
diff src/init.c @ 211:ef80f7c52c6d
add VC2012 project to compile static and dynamic lib, also fix some C
issues
author | Q <andrea@nocte.co.uk> |
---|---|
date | Thu, 27 Mar 2014 09:48:26 +0000 |
parents | f262144347e7 |
children | d383a8c66b5d |
line wrap: on
line diff
--- a/src/init.c Mon Mar 17 16:39:30 2014 +0000 +++ b/src/init.c Thu Mar 27 09:48:26 2014 +0000 @@ -43,7 +43,7 @@ #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_ip = (int *)calloc(2 + sqrt((double)N), sizeof(int)); ooura_data->ooura_w = (double *)calloc(N * 5 / 4, sizeof(double)); ooura_data->initialised = true; } @@ -397,7 +397,7 @@ { double *window; - window = malloc(N * sizeof(double)); + window = (double*)malloc(N * sizeof(double)); switch (type) { @@ -444,7 +444,7 @@ #ifdef __GNUC__ __attribute__((constructor)) void init() #else -void _init()ยท +void _init() #endif { #ifdef USE_OOURA