diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2009-04-01 21:13:09 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2009-04-01 21:13:09 +0000 |
commit | 0ed7a8b68dd73e2b0473b8127aeca99f3bac9061 (patch) | |
tree | 5c67818b38a5cc2f9caa5ca7f8640ca356adf02b /externals/grill/fftease/src/fold.c | |
parent | bb4c7f6a245394d09dac9adfb2efb093d3d98452 (diff) |
cleaned up grill externals - replaced with svn:externals to svn.grrrr.org/ext/trunk/
svn path=/trunk/; revision=10951
Diffstat (limited to 'externals/grill/fftease/src/fold.c')
-rw-r--r-- | externals/grill/fftease/src/fold.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/externals/grill/fftease/src/fold.c b/externals/grill/fftease/src/fold.c deleted file mode 100644 index 5b9ce476..00000000 --- a/externals/grill/fftease/src/fold.c +++ /dev/null @@ -1,67 +0,0 @@ -/* - * multiply current input I by window W (both of length Nw); - * using modulus arithmetic, fold and rotate windowed input - * into output array O of (FFT) length N according to current - * input time n - */ -void fold( float *I, float *W, int Nw, float *O, int N, int n ) -{ -#if 1 - int i; - for ( i = 0; i < N; i++ ) O[i] = 0.; - - while ( n < 0 ) n += N; - n %= N; - - for ( i = 0; i < Nw; i++ ) { - O[n] += I[i]*W[i]; - if ( ++n == N ) n = 0; - } -#else - int i; - - for ( i = 0; i < N; i++ ) - O[i] = 0.; - - while ( n < 0 ) - n += N; - n %= N; - for ( i = 0; i < Nw; i++ ) { - O[n] += I[i]*W[i]; - if ( ++n == N ) - n = 0; - } -#endif -} - - -/* - * input I is a folded spectrum of length N; output O and - * synthesis window W are of length Nw--overlap-add windowed, - * unrotated, unfolded input data into output O - */ -void overlapadd( float *I, int N, float *W, float *O, int Nw, int n ) -{ -#if 1 - int i ; - while ( n < 0 ) n += N ; - n %= N ; - - for ( i = 0 ; i < Nw ; i++ ) { - O[i] += I[n]*W[i] ; - if ( ++n == N ) n = 0 ; - } -#else - int i ; - while ( n < 0 ) - n += N ; - n %= N ; - for ( i = 0 ; i < Nw ; i++ ) { - O[i] += I[n]*W[i] ; - if ( ++n == N ) - n = 0 ; - } - -#endif -} - |