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

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

tests/src: add AUBIO_UNSTABLE where needed

  • Property mode set to 100644
File size: 899 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 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
25  if (fvec_max (coeffs) != 0.) {
26    return -1;
27  }
28
29  if (fvec_min (coeffs) != 0.) {
30    return -1;
31  }
32
33  fvec_print (coeffs);
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.