diff options
Diffstat (limited to 'src/tab_max_index.c')
-rw-r--r-- | src/tab_max_index.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tab_max_index.c b/src/tab_max_index.c index 8da656b..c249ee1 100644 --- a/src/tab_max_index.c +++ b/src/tab_max_index.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_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2006 */ +iem_tab written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ #include "m_pd.h" #include "iemlib.h" @@ -14,7 +14,7 @@ typedef struct _tab_max_index t_object x_obj; int x_size_src1; int x_offset_src1; - t_float *x_beg_mem_src1; + iemarray_t *x_beg_mem_src1; t_symbol *x_sym_scr1; void *x_bang_out; void *x_max_out; @@ -32,7 +32,7 @@ static void tab_max_index_bang(t_tab_max_index *x) { int i, n; int ok_src, max_index=0; - t_float *vec_src; + iemarray_t *vec_src; t_float max=-1.0e37; ok_src = iem_tab_check_arrays(gensym("tab_max_index"), x->x_sym_scr1, &x->x_beg_mem_src1, &x->x_size_src1, 0); @@ -45,9 +45,9 @@ static void tab_max_index_bang(t_tab_max_index *x) { for(i=0; i<n; i++) { - if(vec_src[i] > max) + if(iemarray_getfloat(vec_src, i) > max) { - max = vec_src[i]; + max = iemarray_getfloat(vec_src, i); max_index = i; } } @@ -63,7 +63,7 @@ static void tab_max_index_list(t_tab_max_index *x, t_symbol *s, int argc, t_atom int beg_src; int i, n; int ok_src, max_index=0; - t_float *vec_src; + iemarray_t *vec_src; t_float max=-1.0e37; if((argc >= 2) && @@ -86,9 +86,9 @@ static void tab_max_index_list(t_tab_max_index *x, t_symbol *s, int argc, t_atom { for(i=0; i<n; i++) { - if(vec_src[i] > max) + if(iemarray_getfloat(vec_src, i) > max) { - max = vec_src[i]; + max = iemarray_getfloat(vec_src, i); max_index = i + beg_src; } } |