From a7d2dd2df337a2c7bb1fc84a33d7497e6aacf9fc Mon Sep 17 00:00:00 2001 From: musil Date: Wed, 4 Mar 2009 14:31:46 +0000 Subject: compatible to new array struct svn path=/trunk/externals/iem/iem_spec2/; revision=10834 --- src/spec2_tabreceive~.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'src/spec2_tabreceive~.c') diff --git a/src/spec2_tabreceive~.c b/src/spec2_tabreceive~.c index 69029d2..ac30b5c 100644 --- a/src/spec2_tabreceive~.c +++ b/src/spec2_tabreceive~.c @@ -1,19 +1,19 @@ /* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. -iem_spec2 written by Thomas Musil (c) IEM KUG Graz Austria 2000 - 2006 */ +iem_spec2 written by Thomas Musil (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" -/* ------------------------ spec2_tabreceive_tilde~ ------------------------- */ +/* ------------------------ spec2_tabreceive~ ------------------------- */ static t_class *spec2_tabreceive_tilde_class; typedef struct _spec2_tabreceive_tilde { t_object x_obj; - iemarray_t*x_vec; + iemarray_t *x_vec; t_symbol *x_arrayname; } t_spec2_tabreceive_tilde; @@ -26,22 +26,20 @@ static t_int *spec2_tabreceive_tilde_perform(t_int *w) { t_spec2_tabreceive_tilde *x = (t_spec2_tabreceive_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); - int n = w[3]+1; + int n = w[3]+1, i; iemarray_t *vec = x->x_vec; + if(vec) - while(n--) { -#ifdef __x86_64__ - t_word wp=*vec++; - *out++=wp.w_float; -#else - *out++ = *vec++; -#endif - } + { + for(i=0; i