source: tests/src/test-filterbank.c @ aea235c

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

tests/src: switch to mono

  • Property mode set to 100644
File size: 833 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 = 1024;          /* window size */
11  uint_t n_filters = 13;        /* 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
16  /* allocate fft and other memory space */
17  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
18
19  coeffs = aubio_filterbank_get_coeffs (o);
20  if (coeffs == NULL) {
21    return -1;
22  }
23
24  /*
25  if (fvec_max (coeffs) != 0.) {
26    return -1;
27  }
28
29  if (fvec_min (coeffs) != 0.) {
30    return -1;
31  }
32  */
33
34  fmat_print (coeffs);
35
36  aubio_filterbank_do (o, in, out);
37
38  del_aubio_filterbank (o);
39  del_cvec (in);
40  del_fvec (out);
41  aubio_cleanup ();
42
43  return 0;
44}
Note: See TracBrowser for help on using the repository browser.