source: tests/src/spectral/test-filterbank_mel.c @ f400ea1

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since f400ea1 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: 895 bytes
Line 
1#define AUBIO_UNSTABLE 1
2
3#include <stdio.h>
4#include <aubio.h>
5
6int
7main (void)
8{
9  /* 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 */
14  fmat_t *coeffs = NULL;
15  smpl_t samplerate = 16000.;
16
17  /* allocate fft and other memory space */
18  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
19
20  /* assign Mel-frequency coefficients */
21  aubio_filterbank_set_mel_coeffs_slaney (o, samplerate);
22
23  coeffs = aubio_filterbank_get_coeffs (o);
24  if (coeffs == NULL) {
25    return -1;
26  }
27
28  //fmat_print (coeffs);
29
30  //fprintf(stderr, "%f\n", fvec_sum(coeffs));
31
32  aubio_filterbank_do (o, in, out);
33
34  del_aubio_filterbank (o);
35  del_cvec (in);
36  del_fvec (out);
37  aubio_cleanup ();
38
39  return 0;
40}
Note: See TracBrowser for help on using the repository browser.