Changeset 88a4d8a for tests/src/spectral/test-awhitening.c
- Timestamp:
- Nov 26, 2018, 11:48:27 AM (6 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
- Children:
- 804c8eb
- Parents:
- ce323e4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/spectral/test-awhitening.c
rce323e4 r88a4d8a 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.