 Timestamp:
 Sep 25, 2009, 4:23:21 AM (11 years ago)
 Branches:
 feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
 Children:
 51ee670
 Parents:
 d84d19e
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

tests/src/testwindow.c
rd84d19e rff9d00c 1 1 #include <aubio.h> 2 2 #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 {9 for (j=0;j<f>length;j++)10 {11 printf("%1.3e, ", f>data[i][j]);12 }13 printf(";\n");14 }15 }16 3 17 4 int main( int argc, char** argv ) … … 20 7 for (length = 2; length <= 5; length++) 21 8 { 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); 9 fvec_t *t = new_aubio_window(length,aubio_win_rectangle); 10 del_fvec(t); 11 t = new_aubio_window(length,aubio_win_hamming); 12 fvec_print(t); 13 del_fvec(t); 14 t = new_aubio_window(length,aubio_win_hanning); 15 fvec_print(t); 16 del_fvec(t); 17 t = new_aubio_window(length,aubio_win_hanningz); 18 fvec_print(t); 19 del_fvec(t); 20 t = new_aubio_window(length,aubio_win_blackman); 21 fvec_print(t); 22 del_fvec(t); 23 t = new_aubio_window(length,aubio_win_blackman_harris); 24 fvec_print(t); 25 del_fvec(t); 26 t = new_aubio_window(length,aubio_win_gaussian); 27 fvec_print(t); 28 del_fvec(t); 29 t = new_aubio_window(length,aubio_win_welch); 30 fvec_print(t); 31 del_fvec(t); 32 t = new_aubio_window(length,aubio_win_parzen); 33 fvec_print(t); 33 34 del_fvec(t); 34 35 }
Note: See TracChangeset
for help on using the changeset viewer.