source: tests/src/test-mfcc.c @ 4621cd6

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 4621cd6 was b2e706f, checked in by Paul Brossier <piem@piem.org>, 15 years ago

tests/src/test-mfcc.c: simplify using cvec_set

  • Property mode set to 100644
File size: 790 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 channels = 1;          /* number of channel */
9  uint_t n_filters = 40;        /* number of filters */
10  uint_t n_coefs = 13;          /* number of coefficients */
11  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
12  fvec_t *out = new_fvec (n_coefs, channels);     /* input buffer */
13  smpl_t samplerate = 16000.;
14
15  /* allocate fft and other memory space */
16  aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate);
17
18  cvec_set (in, 1.);
19
20  aubio_mfcc_do (o, in, out);
21  fvec_print (out);
22  aubio_mfcc_do (o, in, out);
23  fvec_print (out);
24
25  del_aubio_mfcc (o);
26  del_cvec (in);
27  del_fvec (out);
28  aubio_cleanup ();
29
30  return 0;
31}
Note: See TracBrowser for help on using the repository browser.