source: examples/tests/test-mfft.c @ 38837b1

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 38837b1 was cdfad6fd, checked in by Paul Brossier <piem@altern.org>, 18 years ago

complete test-mfft memory freeing, comment out printfs
complete test-mfft memory freeing, comment out printfs

  • Property mode set to 100644
File size: 1.1 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_mfft_t * fft = new_aubio_mfft(win_s,channels);
13        /* fill input with some data */
14        //printf("initialised\n");
15        /* execute stft */
16        aubio_mfft_do (fft,in,fftgrain);
17        //printf("computed forward\n");
18        /* execute inverse fourier transform */
19        aubio_mfft_rdo(fft,fftgrain,out);
20        //printf("computed backard\n");
21        del_aubio_mfft(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.