source: tests/src/spectral/test-phasevoc.c @ 8f68dfb

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 8f68dfb was 02418f6, checked in by Paul Brossier <piem@piem.org>, 12 years ago

tests/: move file around to match src/

  • Property mode set to 100644
File size: 1.0 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        /* allocate some memory */
10        fvec_t * in       = new_fvec (hop_s); /* input buffer       */
11        cvec_t * fftgrain = new_cvec (win_s); /* fft norm and phase */
12        fvec_t * out      = new_fvec (hop_s); /* output buffer      */
13        /* allocate fft and other memory space */
14        aubio_pvoc_t * pv = new_aubio_pvoc(win_s,hop_s);
15        /* fill input with some data */
16        printf("initialised\n");
17        /* execute stft */
18        aubio_pvoc_do (pv,in,fftgrain);
19        printf("computed forward\n");
20        /* execute inverse fourier transform */
21        aubio_pvoc_rdo(pv,fftgrain,out);
22        printf("computed backard\n");
23        del_aubio_pvoc(pv);
24        del_fvec(in);
25        del_cvec(fftgrain);
26        del_fvec(out);
27        aubio_cleanup();
28        printf("memory freed\n");
29        return 0;
30}
Note: See TracBrowser for help on using the repository browser.