From 6427e6ddf009b3f4d15cbc009134b0693f91638d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 30 Oct 2007 03:39:11 +0100 Subject: [PATCH] use local comments in test-fft.c --- tests/src/test-fft.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tests/src/test-fft.c b/tests/src/test-fft.c index 17adeb58..8fe781fd 100644 --- a/tests/src/test-fft.c +++ b/tests/src/test-fft.c @@ -8,35 +8,34 @@ int main(){ uint_t i,j; - /* allocate some memory */ - uint_t win_s = 1024; /* window size */ - uint_t channels = 1; /* number of channel */ - fvec_t * in = new_fvec (win_s, channels); /* input buffer */ - cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */ - fvec_t * out = new_fvec (win_s, channels); /* output buffer */ + uint_t win_s = 1024; // window size + uint_t channels = 1; // number of channel + fvec_t * in = new_fvec (win_s, channels); // input buffer + cvec_t * fftgrain = new_cvec (win_s, channels); // fft norm and phase + fvec_t * out = new_fvec (win_s, channels); // output buffer - /* allocate fft and other memory space */ - aubio_fft_t * fft = new_aubio_fft(win_s); /* fft interface */ - smpl_t * w = NEW_ARRAY(smpl_t,win_s); /* window */ - /* complex spectral data */ + // allocate fft and other memory space + aubio_fft_t * fft = new_aubio_fft(win_s); // fft interface + smpl_t * w = NEW_ARRAY(smpl_t,win_s); // window + // complex spectral data fft_data_t ** spec = NEW_ARRAY(fft_data_t*,channels); for (i=0; i < channels; i++) spec[i] = NEW_ARRAY(fft_data_t,win_s); - /* initialize the window (see mathutils.c) */ + // initialize the window (see mathutils.c) aubio_window(w,win_s,aubio_win_hanningz); - /* fill input with some data */ + // fill input with some data in->data[0][win_s/2] = 1; - /* execute stft */ + // execute stft for (i=0; i < channels; i++) { aubio_fft_do (fft,in->data[i],spec[i],win_s); - /* put norm and phase into fftgrain */ + // put norm and phase into fftgrain aubio_fft_getnorm(fftgrain->norm[i], spec[i], win_s/2+1); aubio_fft_getphas(fftgrain->phas[i], spec[i], win_s/2+1); } - /* execute inverse fourier transform */ + // execute inverse fourier transform for (i=0; i < channels; i++) { for (j=0; jphas[i][j])); -- 2.26.2