Changeset 17fbb7a


Ignore:
Timestamp:
Jul 21, 2006, 8:08:40 PM (15 years ago)
Author:
Paul Brossier <piem@altern.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
cdfad6fd
Parents:
e8830c4
Message:

complete test-fft memory freeing
complete test-fft memory freeing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/tests/test-fft.c

    re8830c4 r17fbb7a  
    11
    22#include "aubio_priv.h"
    3 #include "aubio.h"
     3#include <aubio.h>
    44
    55int main(){
     
    1313 
    1414        /* allocate fft and other memory space */
    15         aubio_fft_t * fft      = new_aubio_fft(win_s);              /* fftw interface */
    16         smpl_t * w             = AUBIO_ARRAY(smpl_t,win_s);         /* window */
     15        aubio_fft_t * fft      = new_aubio_fft(win_s);      /* fft interface */
     16        smpl_t * w             = AUBIO_ARRAY(smpl_t,win_s); /* window */
    1717        /* complex spectral data */
    1818        fft_data_t ** spec      = AUBIO_ARRAY(fft_data_t*,channels);
     
    4040                aubio_fft_rdo(fft,spec[i],out->data[i],win_s);
    4141        }
     42
     43        del_fvec(in);
     44        del_fvec(out);
     45        del_cvec(fftgrain);
     46        AUBIO_FREE(w);
     47        del_aubio_fft(fft);
     48        for (i=0; i < channels; i++)
     49                AUBIO_FREE(spec[i]);
     50        AUBIO_FREE(spec);
     51        aubio_cleanup();
    4252        return 0;
    4353}
Note: See TracChangeset for help on using the changeset viewer.