Revision: 10530 http://pure-data.svn.sourceforge.net/pure-data/?rev=10530&view=rev Author: zmoelnig Date: 2009-01-13 16:50:33 +0000 (Tue, 13 Jan 2009)
Log Message: ----------- make array access 64bit-able
Modified Paths: -------------- trunk/externals/iem/iem_spec2/src/iemlib.h trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c
Modified: trunk/externals/iem/iem_spec2/src/iemlib.h =================================================================== --- trunk/externals/iem/iem_spec2/src/iemlib.h 2009-01-13 16:40:12 UTC (rev 10529) +++ trunk/externals/iem/iem_spec2/src/iemlib.h 2009-01-13 16:50:33 UTC (rev 10530) @@ -99,4 +99,16 @@
#endif
+/* on 64bit systems we cannot use garray_getfloatarray... */ +#if (defined __x86_64__) +# define iemarray_t t_word +# define iemarray_getarray garray_getfloatwords +# define iemarray_getfloat(pointer, index) (pointer[index].w_float) +#else +# define iemarray_t t_float +# define iemarray_getarray garray_getfloatarray +# define iemarray_getfloat(pointer, index) (pointer[index]) #endif + + +#endif
Modified: trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c =================================================================== --- trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c 2009-01-13 16:40:12 UTC (rev 10529) +++ trunk/externals/iem/iem_spec2/src/spec2_tab_conv~.c 2009-01-13 16:50:33 UTC (rev 10530) @@ -12,7 +12,7 @@ { t_object x_obj; t_float *x_spec; - t_float *x_beg_array; + iemarray_t *x_beg_array; int x_blocksize; int x_winsize; int x_has_changed; @@ -82,7 +82,7 @@ if(*x->x_sym_array->s_name) error("spec2_tab_conv~: %s: no such array", x->x_sym_array->s_name); } - else if(!garray_getfloatarray(a, &n_points, &x->x_beg_array)) + else if(!iemarray_getarray(a, &n_points, &x->x_beg_array)) error("%s: bad template for spec2_tab_conv~", x->x_sym_array->s_name); else {
Modified: trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c =================================================================== --- trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c 2009-01-13 16:40:12 UTC (rev 10529) +++ trunk/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c 2009-01-13 16:50:33 UTC (rev 10530) @@ -13,7 +13,7 @@ typedef struct _spec2_tabreceive_enable_tilde { t_object x_obj; - t_float *x_vec; + iemarray_t *x_vec; t_symbol *x_arrayname; int x_enable; } t_spec2_tabreceive_enable_tilde; @@ -123,7 +123,7 @@ if(*x->x_arrayname->s_name) error("spec2_tabreceive_enable~: %s: no such array", x->x_arrayname->s_name); } - else if(!garray_getfloatarray(a, &vecsize, &x->x_vec)) + else if(!iemarray_getarray(a, &vecsize, &x->x_vec)) error("%s: bad template for spec2_tabreceive_enable~", x->x_arrayname->s_name); else {
Modified: trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c =================================================================== --- trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c 2009-01-13 16:40:12 UTC (rev 10529) +++ trunk/externals/iem/iem_spec2/src/spec2_tabreceive~.c 2009-01-13 16:50:33 UTC (rev 10530) @@ -13,7 +13,7 @@ typedef struct _spec2_tabreceive_tilde { t_object x_obj; - t_float *x_vec; + iemarray_t*x_vec; t_symbol *x_arrayname; } t_spec2_tabreceive_tilde;
@@ -27,7 +27,7 @@ t_spec2_tabreceive_tilde *x = (t_spec2_tabreceive_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]+1; - t_float *vec = x->x_vec; + iemarray_t *vec = x->x_vec;
if(vec) while(n--) @@ -43,7 +43,7 @@ t_spec2_tabreceive_tilde *x = (t_spec2_tabreceive_tilde *)(w[1]); t_float *out = (t_float *)(w[2]); int n = w[3]; - t_float *vec = x->x_vec; + iemarray_t *vec = x->x_vec;
if(vec) { @@ -112,7 +112,7 @@ if(*x->x_arrayname->s_name) error("spec2_tabreceive~: %s: no such array", x->x_arrayname->s_name); } - else if(!garray_getfloatarray(a, &vecsize, &x->x_vec)) + else if(!iemarray_getarray(a, &vecsize, &x->x_vec)) error("%s: bad template for spec2_tabreceive~", x->x_arrayname->s_name); else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.