diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2008-07-22 09:18:54 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2008-07-22 09:18:54 +0000 |
commit | 9f78b7b8b2ea1729389a1bbb09364a2a1c6f2781 (patch) | |
tree | d762cc4340fe8dc40005bd85a1db22f908f806f2 /src | |
parent | e57133af3f8ba27be56c5b9eb59a9ff747783874 (diff) |
changed from mtx_rowrfft and mtx_rowrifft to
mtx_rfft and mtx_rifft
svn path=/trunk/externals/iem/iemmatrix/; revision=10193
Diffstat (limited to 'src')
-rw-r--r-- | src/mtx_rfft.c (renamed from src/mtx_rowrfft.c) | 42 | ||||
-rw-r--r-- | src/mtx_rifft.c (renamed from src/mtx_rowrifft.c) | 56 |
2 files changed, 49 insertions, 49 deletions
diff --git a/src/mtx_rowrfft.c b/src/mtx_rfft.c index b3d0517..e97f338 100644 --- a/src/mtx_rowrfft.c +++ b/src/mtx_rfft.c @@ -15,10 +15,10 @@ #include "iemmatrix.h" #include <stdlib.h> -static t_class *mtx_rowrfft_class; +static t_class *mtx_rfft_class; -typedef struct _MTXRowrfft_ MTXRowrfft; -struct _MTXRowrfft_ +typedef struct _MTXRfft_ MTXRfft; +struct _MTXRfft_ { t_object x_obj; int size; @@ -34,7 +34,7 @@ struct _MTXRowrfft_ t_atom *list_im; }; -static void deleteMTXRowrfft (MTXRowrfft *x) +static void deleteMTXRfft (MTXRfft *x) { if (x->f_re) free (x->f_re); @@ -46,9 +46,9 @@ static void deleteMTXRowrfft (MTXRowrfft *x) free (x->list_im); } -static void *newMTXRowrfft (t_symbol *s, int argc, t_atom *argv) +static void *newMTXRfft (t_symbol *s, int argc, t_atom *argv) { - MTXRowrfft *x = (MTXRowrfft *) pd_new (mtx_rowrfft_class); + MTXRfft *x = (MTXRfft *) pd_new (mtx_rfft_class); x->list_re_out = outlet_new (&x->x_obj, gensym("matrix")); x->list_im_out = outlet_new (&x->x_obj, gensym("matrix")); @@ -59,7 +59,7 @@ static void *newMTXRowrfft (t_symbol *s, int argc, t_atom *argv) return ((void *) x); } -static void mTXrowrfftBang (MTXRowrfft *x) +static void mTXRfftBang (MTXRfft *x) { if (x->list_im) { outlet_anything(x->list_im_out, gensym("matrix"), x->size2, x->list_im); @@ -100,7 +100,7 @@ static void readFloatFromList (int n, t_atom *l, t_float *f) *f++ = atom_getfloat (l++); } -static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s, +static void mTXRfftMatrix (MTXRfft *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); @@ -117,11 +117,11 @@ static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s, /* fftsize check */ if (!size) - post("mtx_rowrfft: invalid dimensions"); + post("mtx_rfft: invalid dimensions"); else if (in_size<size) - post("mtx_rowrfft: sparse matrix not yet supported: use \"mtx_check\""); + post("mtx_rfft: sparse matrix not yet supported: use \"mtx_check\""); else if (columns < 4){ - post("mtx_rowrfft: matrix must have at least 4 columns"); + post("mtx_rfft: matrix must have at least 4 columns"); } else if (columns == (1 << ilog2(columns))) { /* ok, do the FFT! */ @@ -175,18 +175,18 @@ static void mTXrowrfftMatrix (MTXRowrfft *x, t_symbol *s, } -void mtx_rowrfft_setup (void) +void mtx_rfft_setup (void) { - mtx_rowrfft_class = class_new - (gensym("mtx_rowrfft"), - (t_newmethod) newMTXRowrfft, - (t_method) deleteMTXRowrfft, - sizeof (MTXRowrfft), + mtx_rfft_class = class_new + (gensym("mtx_rfft"), + (t_newmethod) newMTXRfft, + (t_method) deleteMTXRfft, + sizeof (MTXRfft), CLASS_DEFAULT, A_GIMME, 0); - class_addbang (mtx_rowrfft_class, (t_method) mTXrowrfftBang); - class_addmethod (mtx_rowrfft_class, (t_method) mTXrowrfftMatrix, gensym("matrix"), A_GIMME,0); + class_addbang (mtx_rfft_class, (t_method) mTXRfftBang); + class_addmethod (mtx_rfft_class, (t_method) mTXRfftMatrix, gensym("matrix"), A_GIMME,0); } -void iemtx_rowrfft_setup(void){ - mtx_rowrfft_setup(); +void iemtx_rfft_setup(void){ + mtx_rfft_setup(); } diff --git a/src/mtx_rowrifft.c b/src/mtx_rifft.c index a70e405..7a1142f 100644 --- a/src/mtx_rowrifft.c +++ b/src/mtx_rifft.c @@ -15,9 +15,9 @@ #include "iemmatrix.h" #include <stdlib.h> -static t_class *mtx_rowrifft_class; +static t_class *mtx_rifft_class; -typedef struct _MTXRowrifft_ +typedef struct _MTXRifft_ { t_object x_obj; int rows; @@ -35,7 +35,7 @@ typedef struct _MTXRowrifft_ t_atom *list_re; t_atom *list_im; -} MTXRowrifft; +} MTXRifft; /* helper functions: these should really go into a separate file! */ @@ -78,16 +78,16 @@ static void ifftPrepareReal (int n, t_float *re, t_float *im) } -static void *newMTXRowrifft (t_symbol *s, int argc, t_atom *argv) +static void *newMTXRifft (t_symbol *s, int argc, t_atom *argv) { - MTXRowrifft *x = (MTXRowrifft *) pd_new (mtx_rowrifft_class); + MTXRifft *x = (MTXRifft *) pd_new (mtx_rifft_class); inlet_new(&x->x_obj, &x->x_obj.ob_pd, gensym("matrix"),gensym("")); x->list_re_out = outlet_new (&x->x_obj, gensym("matrix")); return ((void *) x); } -static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s, +static void mTXRifftMatrixCold (MTXRifft *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); @@ -103,13 +103,13 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s, /* ifftsize check */ if (columns_re < 3) - post("mtx_rowrifft: matrix must have at least 3 columns"); + post("mtx_rifft: matrix must have at least 3 columns"); else if (!size) - post("mtx_rowrifft: invalid dimensions"); + post("mtx_rifft: invalid dimensions"); else if (in_size < size2) - post("mtx_rowrifft: sparse matrix not yet supported: use \"mtx_check\""); + post("mtx_rifft: sparse matrix not yet supported: use \"mtx_check\""); else if (columns<4) - post("mtx_rowrifft: too small matrices"); + post("mtx_rifft: too small matrices"); else if (columns == (1 << ilog2(columns))) { /* memory things */ @@ -137,10 +137,10 @@ static void mTXrowrifftMatrixCold (MTXRowrifft *x, t_symbol *s, /* do nothing else! */ } else - post("mtx_rowrifft: rowvector 2*(size+1) no power of 2!"); + post("mtx_rifft: rowvector 2*(size+1) no power of 2!"); } -static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s, +static void mTXRifftMatrixHot (MTXRifft *x, t_symbol *s, int argc, t_atom *argv) { int rows = atom_getint (argv++); @@ -158,11 +158,11 @@ static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s, /* ifftsize check */ if ((rows != x->rows) || (columns_re != x->columns_re)) - post("mtx_rowrifft: matrix dimensions do not match"); + post("mtx_rifft: matrix dimensions do not match"); else if (in_size<size2) - post("mtx_rowrifft: sparse matrix not yet supported: use \"mtx_check\""); + post("mtx_rifft: sparse matrix not yet supported: use \"mtx_check\""); else if (!x->size2) - post("mtx_rowrifft: invalid right side matrix"); + post("mtx_rifft: invalid right side matrix"); else { /* main part */ ifft_count = rows; ptr_re += 2; @@ -188,7 +188,7 @@ static void mTXrowrifftMatrixHot (MTXRowrifft *x, t_symbol *s, } } -static void mTXrowrifftBang (MTXRowrifft *x) +static void mTXRifftBang (MTXRifft *x) { if (x->list_re) outlet_anything(x->list_re_out, gensym("matrix"), @@ -196,7 +196,7 @@ static void mTXrowrifftBang (MTXRowrifft *x) } -static void deleteMTXRowrifft (MTXRowrifft *x) +static void deleteMTXRifft (MTXRifft *x) { if (x->f_re) free(x->f_re); @@ -208,19 +208,19 @@ static void deleteMTXRowrifft (MTXRowrifft *x) free(x->list_im); } -static void mtx_rowrifft_setup (void) +static void mtx_rifft_setup (void) { - mtx_rowrifft_class = class_new - (gensym("mtx_rowrifft"), - (t_newmethod) newMTXRowrifft, - (t_method) deleteMTXRowrifft, - sizeof (MTXRowrifft), + mtx_rifft_class = class_new + (gensym("mtx_rifft"), + (t_newmethod) newMTXRifft, + (t_method) deleteMTXRifft, + sizeof (MTXRifft), CLASS_DEFAULT, A_GIMME, 0); - class_addbang (mtx_rowrifft_class, (t_method) mTXrowrifftBang); - class_addmethod (mtx_rowrifft_class, (t_method) mTXrowrifftMatrixHot, gensym("matrix"), A_GIMME,0); - class_addmethod (mtx_rowrifft_class, (t_method) mTXrowrifftMatrixCold, gensym(""), A_GIMME,0); + class_addbang (mtx_rifft_class, (t_method) mTXRifftBang); + class_addmethod (mtx_rifft_class, (t_method) mTXRifftMatrixHot, gensym("matrix"), A_GIMME,0); + class_addmethod (mtx_rifft_class, (t_method) mTXRifftMatrixCold, gensym(""), A_GIMME,0); } -void iemtx_rowrifft_setup(void){ - mtx_rowrifft_setup(); +void iemtx_rifft_setup(void){ + mtx_rifft_setup(); } |