Changeset bd1a630
- Timestamp:
- Oct 7, 2009, 7:39:11 PM (15 years ago)
- 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:
- 33916b8
- Parents:
- e5e693e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/test-filter.c
re5e693e rbd1a630 1 1 #include <aubio.h> 2 2 3 int main(){ 4 /* allocate some memory */ 5 uint_t win_s = 1024; /* window size */ 6 uint_t channels = 1; /* number of channel */ 7 fvec_t * in = new_fvec (win_s, channels); /* input buffer */ 8 fvec_t * out = new_fvec (win_s, channels); /* input buffer */ 9 10 /* allocate fft and other memory space */ 11 aubio_filter_t * o = new_aubio_filter_c_weighting (44100, channels); 3 int 4 main (void) 5 { 6 /* allocate some memory */ 7 uint_t win_s = 32; /* window size */ 8 uint_t channels = 1; /* number of channel */ 9 fvec_t *in = new_fvec (win_s, channels); /* input buffer */ 10 fvec_t *out = new_fvec (win_s, channels); /* input buffer */ 12 11 13 aubio_filter_do(o,in);14 aubio_filter_do_outplace(o,in,out);15 aubio_filter_do_filtfilt(o,in,out);16 12 17 del_aubio_filter(o); 18 del_fvec(in); 19 del_fvec(out); 20 aubio_cleanup(); 13 aubio_filter_t *o = new_aubio_filter_c_weighting (44100, channels); 14 in->data[0][12] = 0.5; 15 fvec_print (in); 16 aubio_filter_do (o, in); 17 fvec_print (in); 18 del_aubio_filter (o); 21 19 22 return 0; 20 aubio_filter_t *o = new_aubio_filter_c_weighting (44100, channels); 21 in->data[0][12] = 0.5; 22 fvec_print (in); 23 aubio_filter_do_outplace (o, in, out); 24 fvec_print (out); 25 del_aubio_filter (o); 26 27 aubio_filter_t *o = new_aubio_filter_c_weighting (44100, channels); 28 in->data[0][12] = 0.5; 29 fvec_print (in); 30 aubio_filter_do_filtfilt (o, in, out); 31 fvec_print (out); 32 del_aubio_filter (o); 33 34 del_fvec (in); 35 del_fvec (out); 36 aubio_cleanup (); 37 38 return 0; 23 39 }
Note: See TracChangeset
for help on using the changeset viewer.