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

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampleryinfft+
Last change on this file since f7e30e8 was 158e031, checked in by Paul Brossier <piem@piem.org>, 11 years ago

tests/: add void to prototypes to build with -Wstrict-prototypes

  • Property mode set to 100644
File size: 689 bytes
RevLine 
[0028ea7]1#include <aubio.h>
2
[158e031]3int main (void)
[0028ea7]4{
[6938a20]5  uint_t win_s = 512; // fft size
6  uint_t n_filters = 40; // number of filters
7  uint_t n_coefs = 13; // number of coefficients
8  smpl_t samplerate = 16000.; // samplerate
9  cvec_t *in = new_cvec (win_s); // input buffer
10  fvec_t *out = new_fvec (n_coefs); // output coefficients
[0028ea7]11
[6938a20]12  // create mfcc object
[2828382]13  aubio_mfcc_t *o = new_aubio_mfcc (win_s, n_filters, n_coefs, samplerate);
[0028ea7]14
[5d10ac1]15  cvec_norm_set_all (in, 1.);
[0028ea7]16  aubio_mfcc_do (o, in, out);
[38e9732]17  fvec_print (out);
[6938a20]18
[5d10ac1]19  cvec_norm_set_all (in, .5);
[38e9732]20  aubio_mfcc_do (o, in, out);
[0028ea7]21  fvec_print (out);
22
[6938a20]23  // clean up
[0028ea7]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.