source: tests/src/spectral/test-mfcc.c @ 8f68dfb

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 8f68dfb 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: 714 bytes
Line 
1#include <aubio.h>
2
3int
4main (void)
5{
6  /* allocate some memory */
7  uint_t win_s = 512;           /* fft size */
8  uint_t n_filters = 40;        /* number of filters */
9  uint_t n_coefs = 13;          /* number of coefficients */
10  cvec_t *in = new_cvec (win_s);      /* input buffer */
11  fvec_t *out = new_fvec (n_coefs);     /* input buffer */
12  smpl_t samplerate = 16000.;
13
14  /* allocate fft and other memory space */
15  aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate);
16
17  cvec_set (in, 1.);
18
19  aubio_mfcc_do (o, in, out);
20  fvec_print (out);
21  aubio_mfcc_do (o, in, out);
22  fvec_print (out);
23
24  del_aubio_mfcc (o);
25  del_cvec (in);
26  del_fvec (out);
27  aubio_cleanup ();
28
29  return 0;
30}
Note: See TracBrowser for help on using the repository browser.