shithub: aubio

Download patch

ref: cdfad6fdc72e5ea503c688665c272efd61a7d245
parent: 17fbb7a21369078b639bc507b4f1d974ff90a481
author: Paul Brossier <piem@altern.org>
date: Fri Jul 21 14:10:23 EDT 2006

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


--- a/examples/tests/test-mfft.c
+++ b/examples/tests/test-mfft.c
@@ -1,10 +1,10 @@
 
-#include "aubio.h"
+#include <aubio.h>
 
 int main(){
         /* allocate some memory */
         uint_t win_s      = 4096;                       /* window size        */
-        uint_t channels   = 1000;                       /* number of channels */
+        uint_t channels   = 100;                        /* number of channels */
         fvec_t * in       = new_fvec (win_s, channels); /* input buffer       */
         cvec_t * fftgrain = new_cvec (win_s, channels); /* fft norm and phase */
         fvec_t * out      = new_fvec (win_s, channels); /* output buffer      */
@@ -11,17 +11,18 @@
         /* allocate fft and other memory space */
         aubio_mfft_t * fft = new_aubio_mfft(win_s,channels);
         /* fill input with some data */
-        printf("initialised\n");
+        //printf("initialised\n");
         /* execute stft */
         aubio_mfft_do (fft,in,fftgrain);
-        printf("computed forward\n");
+        //printf("computed forward\n");
         /* execute inverse fourier transform */
         aubio_mfft_rdo(fft,fftgrain,out);
-        printf("computed backard\n");
+        //printf("computed backard\n");
         del_aubio_mfft(fft);
         del_fvec(in);
         del_cvec(fftgrain);
         del_fvec(out);
-        printf("memory freed\n");
+        //printf("memory freed\n");
+        aubio_cleanup();
         return 0;
 }