source: tests/src/test-filterbank.c @ 21f0655

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

tests/src: add AUBIO_UNSTABLE where needed

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