Ignore:
Timestamp:
Mar 3, 2013, 4:54:04 AM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
ed1deac
Parents:
b8c0685
Message:

tests/src/spectral/: improve test examples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/spectral/test-filterbank_mel.c

    rb8c0685 r8f68dfb  
    88{
    99  /* allocate some memory */
    10   uint_t win_s = 512;           /* fft size */
    11   uint_t n_filters = 40;        /* number of filters */
    12   cvec_t *in = new_cvec (win_s);      /* input buffer */
    13   fvec_t *out = new_fvec (win_s);     /* input buffer */
     10  uint_t win_s = 512; // fft size
     11  uint_t n_filters = 40; // number of filters
     12  cvec_t *in_spec = new_cvec (win_s); // input buffer */
     13  fvec_t *out_filters = new_fvec (n_filters); // output coeffs */
    1414  fmat_t *coeffs = NULL;
    1515  smpl_t samplerate = 16000.;
     
    2222
    2323  coeffs = aubio_filterbank_get_coeffs (o);
    24   if (coeffs == NULL) {
    25     return -1;
    26   }
    2724
    28   //fmat_print (coeffs);
     25  fmat_print (coeffs);
    2926
    3027  //fprintf(stderr, "%f\n", fvec_sum(coeffs));
    3128
    32   aubio_filterbank_do (o, in, out);
     29  aubio_filterbank_do (o, in_spec, out_filters);
     30
     31  fvec_print(in_spec);
     32  fvec_print(out_filters);
    3333
    3434  del_aubio_filterbank (o);
    35   del_cvec (in);
    36   del_fvec (out);
     35  del_cvec (in_spec);
     36  del_fvec (out_filters);
    3737  aubio_cleanup ();
    3838
Note: See TracChangeset for help on using the changeset viewer.