source: tests/src/test-mathutils-window.c @ 54dd945

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

tests/src/: improve examples

  • Property mode set to 100644
File size: 752 bytes
RevLine 
[4e9101e]1#include <aubio.h>
[7e35b37]2#include <math.h>
3#include <stdio.h>
[4e9101e]4
[7e35b37]5int main ()
[4e9101e]6{
[7e35b37]7  uint_t length = 0;
8  uint_t n_length = 4, n_types = 10, i, t;
9  uint_t lengths[4] = { 8, 10, 15, 16 };
10  char *method = "default";
11  char *window_types[10] = { "default",
12    "rectangle", "hamming", "hanning", "hanningz",
13    "blackman", "blackman_harris", "gaussian", "welch", "parzen"};
14
15  for ( t = 0; t < n_types; t ++ ) {
16    for ( i = 0; i < n_length; i++)
17    {
18      length = lengths[i];
19      method = window_types[t];
20
21      fvec_t * window = new_aubio_window(method, length);
22
23      fvec_set_window(window, method);
24      fprintf(stdout, "length: %d, method: %s, window:, ", length, method);
25      fvec_print(window);
26
27      del_fvec(window);
28    }
[4e9101e]29  }
30  return 0;
31}
32
Note: See TracBrowser for help on using the repository browser.