diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tabdump.c | 4 | ||||
-rw-r--r-- | src/tabminmax.c | 4 | ||||
-rw-r--r-- | src/tabread4~~.c | 11 | ||||
-rw-r--r-- | src/tabset.c | 8 | ||||
-rw-r--r-- | src/zexy.h | 10 |
5 files changed, 18 insertions, 19 deletions
diff --git a/src/tabdump.c b/src/tabdump.c index a4de043..64207b6 100644 --- a/src/tabdump.c +++ b/src/tabdump.c @@ -36,11 +36,11 @@ static void tabdump_bang(t_tabdump *x) { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec; if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabdump", x->x_arrayname->s_name); else { diff --git a/src/tabminmax.c b/src/tabminmax.c index fb66b81..3e5dbf7 100644 --- a/src/tabminmax.c +++ b/src/tabminmax.c @@ -35,11 +35,11 @@ static void tabminmax_bang(t_tabminmax *x) { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec; if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabminmax", x->x_arrayname->s_name); else { diff --git a/src/tabread4~~.c b/src/tabread4~~.c index d150afa..a1a4f34 100644 --- a/src/tabread4~~.c +++ b/src/tabread4~~.c @@ -23,17 +23,6 @@ static t_class *tabread4_tilde_class; -#ifdef Z_USE_WORD_ARRAYS -# define zarray_t t_word -# define zarray_getarray garray_getfloatwords -# define zarray_getfloat(pointer, index) (pointer[index].w_float) -#else -# define zarray_t t_float -# define zarray_getarray garray_getfloatarray -# define zarray_getfloat(pointer, index) (pointer[index]) -#endif - - typedef struct _tabread4_tilde { t_object x_obj; diff --git a/src/tabset.c b/src/tabset.c index 6abb91a..5cd7844 100644 --- a/src/tabset.c +++ b/src/tabset.c @@ -33,11 +33,11 @@ static void tabset_float(t_tabset *x, t_floatarg f) { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec; if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabset", x->x_arrayname->s_name); else { while(npoints--)*vec++=f; @@ -49,12 +49,12 @@ static void tabset_list(t_tabset *x, t_symbol *s, int argc, t_atom* argv) { t_garray *A; int npoints; - t_float *vec; + zarray_t *vec; ZEXY_USEVAR(s); if (!(A = (t_garray *)pd_findbyclass(x->x_arrayname, garray_class))) error("%s: no such array", x->x_arrayname->s_name); - else if (!garray_getfloatarray(A, &npoints, &vec)) + else if (!zarray_getarray(A, &npoints, &vec)) error("%s: bad template for tabset", x->x_arrayname->s_name); else { if (argc>=npoints) @@ -140,5 +140,15 @@ static void zexy_register(char*object){object=0;} # define z_verbose #endif +#if (defined __x86_64__) && (defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 41) +# define zarray_t t_word +# define zarray_getarray garray_getfloatwords +# define zarray_getfloat(pointer, index) (pointer[index].w_float) +#else +# define zarray_t t_float +# define zarray_getarray garray_getfloatarray +# define zarray_getfloat(pointer, index) (pointer[index]) +#endif + #endif /* INCLUDE_ZEXY_H__ */ |