source: tests/src/test-phasevoc.c @ 3ac7cb0

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 3ac7cb0 was 47eabeb, checked in by Paul Brossier <piem@piem.org>, 15 years ago

tests/src/test-phasevoc.c add missing stdio.h

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