shithub: aubio

ref: 252a080d310a697b53b2df8b20947de1d8e26a67
dir: /tests/src/test-hist.c/

View raw version
#include <aubio.h>
#include <stdlib.h>

int main( int argc, char** argv )
{
  uint_t length;
  for (length = 1; length < 10; length ++ ) {
    aubio_hist_t *o = new_aubio_hist(0, 1, length, 5);
    fvec_t *t = new_aubio_window(length,aubio_win_hanning);
    aubio_hist_do(o,t);
    fvec_print(t);
    aubio_hist_do_notnull(o,t);
    fvec_print(t);
    aubio_hist_dyn_notnull(o,t);
    fvec_print(t);
    del_fvec(t);
    t = new_aubio_window(length,aubio_win_hanningz);
    aubio_hist_do(o,t);
    fvec_print(t);
    aubio_hist_do_notnull(o,t);
    fvec_print(t);
    aubio_hist_dyn_notnull(o,t);
    fvec_print(t);
    del_aubio_hist(o);
    del_fvec(t);
  }
  return 0;
}