Changeset f87e191 for tests/src/spectral/test-awhitening.c
- Timestamp:
- Nov 26, 2018, 10:33:30 PM (5 years ago)
- Branches:
- feature/constantq
- Children:
- 868c6b8
- Parents:
- d1d4ad4 (diff), db3eb5c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/spectral/test-awhitening.c
rd1d4ad4 rf87e191 1 1 #include <aubio.h> 2 2 #include "utils_tests.h" 3 4 int test_wrong_params(void); 3 5 4 6 int main (int argc, char **argv) … … 8 10 if (argc < 3) { 9 11 err = 2; 10 PRINT_ERR("not enough arguments\n"); 12 PRINT_WRN("no arguments, running tests\n"); 13 if (test_wrong_params() != 0) { 14 PRINT_ERR("tests failed!\n"); 15 err = 1; 16 } else { 17 err = 0; 18 } 11 19 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]); 12 20 return err; … … 83 91 } 84 92 93 int test_wrong_params(void) 94 { 95 uint_t buf_size = 512; 96 uint_t hop_size = 256; 97 uint_t samplerate = 44100; 98 aubio_spectral_whitening_t *o; 99 100 if (new_aubio_spectral_whitening( 0, hop_size, samplerate)) return 1; 101 if (new_aubio_spectral_whitening(buf_size, 0, samplerate)) return 1; 102 if (new_aubio_spectral_whitening(buf_size, hop_size, 0)) return 1; 103 104 o = new_aubio_spectral_whitening(buf_size, hop_size, samplerate); 105 106 aubio_spectral_whitening_get_relax_time(o); 107 aubio_spectral_whitening_get_floor(o); 108 109 del_aubio_spectral_whitening(o); 110 111 return 0; 112 }
Note: See TracChangeset
for help on using the changeset viewer.