source: tests/src/test-fft.c @ 7e204d01

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 7e204d01 was 8701ec3, checked in by Paul Brossier <piem@piem.org>, 17 years ago

removed old test-fft.c, moved mfft to new fft

  • Property mode set to 100644
File size: 1.0 KB
Line 
1
2#include <aubio.h>
3
4int main(){
5        /* allocate some memory */
6        uint_t win_s      = 4096;                       /* window size        */
7        uint_t channels   = 100;                        /* number of channels */
8        fvec_t * in       = new_fvec (win_s, channels); /* input buffer       */
9        cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
10        fvec_t * out      = new_fvec (win_s, channels); /* output buffer      */
11        /* allocate fft and other memory space */
12        aubio_fft_t * fft = new_aubio_fft(win_s,channels);
13        /* fill input with some data */
14        //printf("initialised\n");
15        /* execute stft */
16        aubio_fft_do (fft,in,fftgrain);
17        //printf("computed forward\n");
18        /* execute inverse fourier transform */
19        aubio_fft_rdo(fft,fftgrain,out);
20        //printf("computed backard\n");
21        del_aubio_fft(fft);
22        del_fvec(in);
23        del_cvec(fftgrain);
24        del_fvec(out);
25        //printf("memory freed\n");
26        aubio_cleanup();
27        return 0;
28}
Note: See TracBrowser for help on using the repository browser.