source: examples/tests/test-mfft.c @ 028c8e9

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 028c8e9 was 437fa65, checked in by Paul Brossier <piem@altern.org>, 19 years ago

added examples, bumped VERSION to 0.2.0beta1

  • 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   = 1000;                       /* 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        return 0;
27}
Note: See TracBrowser for help on using the repository browser.