Changeset 51ee670


Ignore:
Timestamp:
Sep 25, 2009, 4:26:14 AM (15 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
e4d0f8f
Parents:
ff9d00c
Message:

tests/src/test-hist.c: update to new_aubio_window

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/src/test-hist.c

    rff9d00c r51ee670  
    11#include <aubio.h>
    22#include <stdlib.h>
    3 
    4 void print_array(fvec_t *f);
    5 void print_array(fvec_t *f){
    6   uint_t i,j;
    7   for (i=0;i<f->channels;i++){
    8     for (j=0;j<f->length;j++){
    9       printf("%f, ", f->data[i][j]);
    10     }
    11     printf(";\n");
    12   }
    13 }
    143
    154int main( int argc, char** argv )
     
    176  uint_t length;
    187  for (length = 1; length < 10; length ++ ) {
    19     fvec_t *t = new_fvec(length,5);
    208    aubio_hist_t *o = new_aubio_hist(0, 1, length, 5);
    21     aubio_window(t->data[0],t->length,aubio_win_hanning);
    22     aubio_window(t->data[1],t->length,aubio_win_hanningz);
    23     aubio_window(t->data[2],t->length,aubio_win_blackman);
    24     aubio_window(t->data[3],t->length,aubio_win_blackman_harris);
    25     aubio_window(t->data[4],t->length,aubio_win_hamming);
    26     print_array(t);
     9    fvec_t *t = new_aubio_window(length,aubio_win_hanning);
    2710    aubio_hist_do(o,t);
    28     print_array(t);
     11    fvec_print(t);
    2912    aubio_hist_do_notnull(o,t);
    30     print_array(t);
     13    fvec_print(t);
    3114    aubio_hist_dyn_notnull(o,t);
    32     print_array(t);
     15    fvec_print(t);
     16    del_fvec(t);
     17    t = new_aubio_window(length,aubio_win_hanningz);
     18    aubio_hist_do(o,t);
     19    fvec_print(t);
     20    aubio_hist_do_notnull(o,t);
     21    fvec_print(t);
     22    aubio_hist_dyn_notnull(o,t);
     23    fvec_print(t);
    3324    del_aubio_hist(o);
    3425    del_fvec(t);
Note: See TracChangeset for help on using the changeset viewer.