Changeset 8968ea7 for tests/src/onset/test-onset.c
- Timestamp:
- Nov 29, 2018, 7:19:52 PM (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:
- 3821415
- Parents:
- c0ce78f (diff), 2cf905f (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/onset/test-onset.c
rc0ce78f r8968ea7 10 10 err = 2; 11 11 PRINT_WRN("no arguments, running tests\n"); 12 if (test_wrong_params() != 0) { 13 PRINT_ERR("tests failed!\n"); 14 err = 1; 15 } else { 16 err = 0; 17 } 12 err = test_wrong_params(); 18 13 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); 19 14 return err; … … 23 18 uint_t hop_size = win_s / 4; 24 19 uint_t n_frames = 0, read = 0; 25 if ( argc == 3 ) samplerate = atoi(argv[2]);26 if ( argc == 4 ) hop_size = atoi(argv[3]);20 if ( argc >= 3 ) samplerate = atoi(argv[2]); 21 if ( argc >= 4 ) hop_size = atoi(argv[3]); 27 22 28 23 char_t *source_path = argv[1]; … … 90 85 if (new_aubio_onset("abcd", win_size, win_size/2, samplerate)) 91 86 return 1; 92 // pv creation failed93 if (new_aubio_onset("default", 5, 2, samplerate))94 return 1;95 87 96 88 aubio_onset_t *o; 89 90 // pv creation might fail 91 o = new_aubio_onset("default", 5, 2, samplerate); 92 if (o) del_aubio_onset(o); 93 97 94 o = new_aubio_onset("default", win_size, hop_size, samplerate); 98 95 if (!aubio_onset_set_default_parameters(o, "wrong_type")) … … 100 97 del_aubio_onset(o); 101 98 102 return 0;99 return run_on_default_source(main); 103 100 }
Note: See TracChangeset
for help on using the changeset viewer.