From e9c0f3b6a6ec5ff6280c7955972cbbd6e336c4dd Mon Sep 17 00:00:00 2001 From: musil Date: Sun, 1 Feb 2009 07:30:18 +0000 Subject: changed for 64 bit array access svn path=/trunk/externals/iem/iem_bin_ambi/; revision=10708 --- src/bin_ambi_calc_HRTF.c | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) (limited to 'src/bin_ambi_calc_HRTF.c') diff --git a/src/bin_ambi_calc_HRTF.c b/src/bin_ambi_calc_HRTF.c index ec7a471..f2ea70f 100644 --- a/src/bin_ambi_calc_HRTF.c +++ b/src/bin_ambi_calc_HRTF.c @@ -1,7 +1,7 @@ /* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. -iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ +iem_bin_ambi written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" @@ -38,7 +38,7 @@ typedef struct _bin_ambi_calc_HRTF BIN_AMBI_COMPLEX *x_spec; BIN_AMBI_COMPLEX *x_sin_cos; iemarray_t *x_beg_fade_out_hrir; - float *x_beg_hrir; + t_float *x_beg_hrir; iemarray_t **x_beg_hrtf_re; iemarray_t **x_beg_hrtf_im; t_symbol **x_hrir_filename; @@ -54,13 +54,13 @@ static t_class *bin_ambi_calc_HRTF_class; static void bin_ambi_calc_HRTF_init_cos(t_bin_ambi_calc_HRTF *x) { int i, fftsize = x->x_fftsize; - float f, g; + t_float f, g; BIN_AMBI_COMPLEX *sincos = x->x_sin_cos; - g = 2.0f * 3.1415926538f / (float)fftsize; + g = 2.0f * 3.1415926538f / (t_float)fftsize; for(i=0; ix_obj.ob_outlet, &s_list, 2, x->x_at); } -static void bin_ambi_calc_HRTF_check_arrays(t_bin_ambi_calc_HRTF *x, float findex) +static void bin_ambi_calc_HRTF_check_arrays(t_bin_ambi_calc_HRTF *x, t_float findex) { int index=(int)findex - 1; int j, k, n; @@ -289,7 +289,7 @@ static void bin_ambi_calc_HRTF_check_arrays(t_bin_ambi_calc_HRTF *x, float finde iemarray_t *vec_fade_out_hrir; iemarray_t *vec_hrir, *vec_hrtf_re, *vec_hrtf_im; t_symbol *hrir, *hrtf_re, *hrtf_im; - float decr, sum; + t_float decr, sum; if(index < 0) index = 0; @@ -342,7 +342,7 @@ static void bin_ambi_calc_HRTF_check_arrays(t_bin_ambi_calc_HRTF *x, float finde for(j=0; jx_spec, x->x_fftsize * sizeof(BIN_AMBI_COMPLEX)); freebytes(x->x_sin_cos, x->x_fftsize * sizeof(BIN_AMBI_COMPLEX)); - freebytes(x->x_beg_hrir, x->x_fftsize * x->x_n_ls * sizeof(float)); - freebytes(x->x_beg_hrtf_re, x->x_n_ls * sizeof(float *)); - freebytes(x->x_beg_hrtf_im, x->x_n_ls * sizeof(float *)); + freebytes(x->x_beg_hrir, x->x_fftsize * x->x_n_ls * sizeof(t_float)); + freebytes(x->x_beg_hrtf_re, x->x_n_ls * sizeof(t_float *)); + freebytes(x->x_beg_hrtf_im, x->x_n_ls * sizeof(t_float *)); } /* @@ -540,7 +538,7 @@ static void *bin_ambi_calc_HRTF_new(t_symbol *s, int argc, t_atom *argv) x->x_sin_cos = (BIN_AMBI_COMPLEX *)getbytes(x->x_fftsize * sizeof(BIN_AMBI_COMPLEX)); x->x_beg_fade_out_hrir = 0; - x->x_beg_hrir = (float *)getbytes(x->x_fftsize * x->x_n_ls * sizeof(float)); + x->x_beg_hrir = (t_float *)getbytes(x->x_fftsize * x->x_n_ls * sizeof(t_float)); x->x_beg_hrtf_re = (iemarray_t **)getbytes(x->x_n_ls * sizeof(iemarray_t *)); x->x_beg_hrtf_im = (iemarray_t **)getbytes(x->x_n_ls * sizeof(iemarray_t *)); -- cgit v1.2.1