From 76573f4923ebe3391ffcb2d6555d1268210d0e21 Mon Sep 17 00:00:00 2001 From: musil Date: Wed, 16 Nov 2011 15:52:04 +0000 Subject: made it compatible to pd44 with double precision svn path=/trunk/externals/iem/iem_tab/; revision=15767 --- src/iem_tab.h | 4 ++-- src/tab_fft.c | 3 +-- src/tab_ifft.c | 7 +++---- src/tab_rfft.c | 23 +++++++++++------------ src/tab_rifft.c | 13 ++++++------- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/src/iem_tab.h b/src/iem_tab.h index 2b38f05..9f1de06 100644 --- a/src/iem_tab.h +++ b/src/iem_tab.h @@ -8,8 +8,8 @@ iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 typedef struct { - float real; - float imag; + t_float real; + t_float imag; } TAB_COMPLEX; diff --git a/src/tab_fft.c b/src/tab_fft.c index a8107d4..dd4f089 100644 --- a/src/tab_fft.c +++ b/src/tab_fft.c @@ -42,7 +42,7 @@ static void tab_fft_init(t_tab_fft *x) t_float f, g; TAB_COMPLEX *sincos = x->x_sin_cos; - g = 2.0f * 3.1415926538f / (t_float)fftsize; + g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_sin_cos; - g = 2.0f * 3.1415926538f / (t_float)fftsize; + g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_sin_cos; - g = 2.0f * 3.1415926538f / (t_float)fftsize; + g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_obj.ob_outlet); @@ -236,7 +236,7 @@ static void tab_rfft_list(t_tab_rfft *x, t_symbol *s, int argc, t_atom *argv) for(k=0; kx_obj.ob_outlet); @@ -384,5 +384,4 @@ void tab_rfft_setup(void) class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_im, gensym("dst_im"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_re, gensym("dst1"), A_DEFSYMBOL, 0); class_addmethod(tab_rfft_class, (t_method)tab_rfft_dst_im, gensym("dst2"), A_DEFSYMBOL, 0); -// class_sethelpsymbol(tab_rfft_class, gensym("iemhelp2/tab_rfft-help")); } diff --git a/src/tab_rifft.c b/src/tab_rifft.c index eddf8ce..6125761 100644 --- a/src/tab_rifft.c +++ b/src/tab_rifft.c @@ -40,7 +40,7 @@ static void tab_rifft_init(t_tab_rifft *x) t_float f, g; TAB_COMPLEX *sincos = x->x_sin_cos; - g = 2.0f * 3.1415926538f / (t_float)fftsize; + g = 2.0 * 3.141592653589793 / (t_float)fftsize; for(i=0; ix_beg_mem_dst_im; iemarray_setfloat(vec_dst_re, 0, iemarray_getfloat(vec_src_re, 0)); - iemarray_setfloat(vec_dst_im, 0, 0.0f); + iemarray_setfloat(vec_dst_im, 0, 0.0); for(j=1; j