feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change
on this file since cdfad6fd 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
|
Rev | Line | |
---|
[437fa65] | 1 | |
---|
[cdfad6fd] | 2 | #include <aubio.h> |
---|
[437fa65] | 3 | |
---|
| 4 | int main(){ |
---|
| 5 | /* allocate some memory */ |
---|
| 6 | uint_t win_s = 4096; /* window size */ |
---|
[cdfad6fd] | 7 | uint_t channels = 100; /* number of channels */ |
---|
[437fa65] | 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 */ |
---|
[cdfad6fd] | 14 | //printf("initialised\n"); |
---|
[437fa65] | 15 | /* execute stft */ |
---|
| 16 | aubio_mfft_do (fft,in,fftgrain); |
---|
[cdfad6fd] | 17 | //printf("computed forward\n"); |
---|
[437fa65] | 18 | /* execute inverse fourier transform */ |
---|
| 19 | aubio_mfft_rdo(fft,fftgrain,out); |
---|
[cdfad6fd] | 20 | //printf("computed backard\n"); |
---|
[437fa65] | 21 | del_aubio_mfft(fft); |
---|
| 22 | del_fvec(in); |
---|
| 23 | del_cvec(fftgrain); |
---|
| 24 | del_fvec(out); |
---|
[cdfad6fd] | 25 | //printf("memory freed\n"); |
---|
| 26 | aubio_cleanup(); |
---|
[437fa65] | 27 | return 0; |
---|
| 28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.