Changeset 633400d for tests/src/synth/test-sampler.c
- Timestamp:
- Dec 5, 2018, 10:34:39 PM (6 years ago)
- Branches:
- feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
- Children:
- 283a619a
- Parents:
- 5b46bc3 (diff), f19db54 (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/synth/test-sampler.c
r5b46bc3 r633400d 1 #include <string.h> // strncpy 2 #include <limits.h> // PATH_MAX 1 3 #include <aubio.h> 2 4 #include "utils_tests.h" … … 6 8 sint_t err = 0; 7 9 8 if (argc < 4) {9 err = 2;10 PRINT_ERR("not enough arguments\n");10 if (argc < 3) { 11 PRINT_ERR("not enough arguments, running tests\n"); 12 err = run_on_default_source_and_sink(main); 11 13 PRINT_MSG("usage: %s <input_path> <output_path> <sample_path> [samplerate]\n", argv[0]); 12 14 return err; … … 19 21 char_t *source_path = argv[1]; 20 22 char_t *sink_path = argv[2]; 21 char_t *sample_path = argv[3]; 22 if ( argc == 5 ) samplerate = atoi(argv[4]); 23 char_t sample_path[PATH_MAX]; 24 if ( argc >= 4 ) { 25 strncpy(sample_path, argv[3], PATH_MAX - 1); 26 } else { 27 // use input_path as sample 28 strncpy(sample_path, source_path, PATH_MAX - 1); 29 } 30 sample_path[PATH_MAX - 1] = '\0'; 31 if ( argc >= 5 ) samplerate = atoi(argv[4]); 23 32 24 33 fvec_t *vec = new_fvec(hop_size);
Note: See TracChangeset
for help on using the changeset viewer.