source: tests/src/test-window.c @ e03f74d

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

tests/src/test-{hist,window}.c: use uint_t, not uint (thanks to Graham Percival)

  • Property mode set to 100644
File size: 979 bytes
Line 
1#include <aubio.h>
2#include <stdlib.h>
3
4void print_array(fvec_t *f);
5void print_array(fvec_t *f){
6  uint_t i,j;
7  for (i=0;i<f->channels;i++)
8  {
9    for (j=0;j<f->length;j++)
10    {
11      printf("%1.3e, ", f->data[i][j]); 
12    }
13    printf(";\n"); 
14  }
15}
16
17int main( int argc, char** argv )
18{
19  uint_t length;
20  for (length = 2; length <= 5; length++)
21  {
22    fvec_t *t = new_fvec(length,9);
23    aubio_window(t->data[0],t->length,aubio_win_rectangle);
24    aubio_window(t->data[1],t->length,aubio_win_hamming);
25    aubio_window(t->data[2],t->length,aubio_win_hanning);
26    aubio_window(t->data[3],t->length,aubio_win_hanningz);
27    aubio_window(t->data[4],t->length,aubio_win_blackman);
28    aubio_window(t->data[5],t->length,aubio_win_blackman_harris);
29    aubio_window(t->data[6],t->length,aubio_win_gaussian);
30    aubio_window(t->data[7],t->length,aubio_win_welch);
31    aubio_window(t->data[8],t->length,aubio_win_parzen);
32    print_array(t);
33    del_fvec(t);
34  }
35  return 0;
36}
37
Note: See TracBrowser for help on using the repository browser.