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

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since d57c879 was d57c879, checked in by Paul Brossier <piem@piem.org>, 11 years ago

tests/src/test-filterbank.c: print coeffs

  • Property mode set to 100644
File size: 871 bytes
Line 
1#include <stdio.h>
2#include <aubio.h>
3
4int
5main (void)
6{
7  /* allocate some memory */
8  uint_t win_s = 1024;          /* window size */
9  uint_t channels = 2;          /* number of channel */
10  uint_t n_filters = 13;        /* number of filters */
11  cvec_t *in = new_cvec (win_s, channels);      /* input buffer */
12  fvec_t *out = new_fvec (win_s, channels);     /* input buffer */
13  fvec_t *coeffs = NULL;
14
15  /* allocate fft and other memory space */
16  aubio_filterbank_t *o = new_aubio_filterbank (n_filters, win_s);
17
18  coeffs = aubio_filterbank_get_coeffs (o);
19  if (coeffs == NULL) {
20    return -1;
21  }
22
23  if (vec_max (coeffs) != 0.) {
24    return -1;
25  }
26
27  if (vec_min (coeffs) != 0.) {
28    return -1;
29  }
30
31  fvec_print (coeffs);
32
33  aubio_filterbank_do (o, in, out);
34
35  del_aubio_filterbank (o);
36  del_cvec (in);
37  del_fvec (out);
38  aubio_cleanup ();
39
40  return 0;
41}
Note: See TracBrowser for help on using the repository browser.