Changeset 8968ea7 for tests/src/io
- 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. - Location:
- tests/src/io
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/io/test-sink-multi.c
rc0ce78f r8968ea7 10 10 11 11 if (argc < 3) { 12 err = 2;13 PRINT_ERR("not enough arguments\n");12 PRINT_ERR("not enough arguments, running tests\n"); 13 err = run_on_default_source_and_sink(main); 14 14 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [channels] [hop_size]\n", argv[0]); 15 15 return err; -
tests/src/io/test-sink.c
rc0ce78f r8968ea7 7 7 8 8 if (argc < 3) { 9 err = 2;10 PRINT_ERR("not enough arguments\n");9 PRINT_ERR("not enough arguments, running tests\n"); 10 err = run_on_default_source_and_sink(main); 11 11 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]); 12 12 return err; -
tests/src/io/test-sink_apple_audio-multi.c
rc0ce78f r8968ea7 11 11 12 12 if (argc < 3) { 13 err = 2;14 PRINT_ERR("not enough arguments\n");13 PRINT_ERR("not enough arguments, running tests\n"); 14 err = run_on_default_source_and_sink(main); 15 15 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [channels] [hop_size]\n", argv[0]); 16 16 return err; … … 72 72 beach_source: 73 73 #else /* HAVE_SINK_APPLE_AUDIO */ 74 err = 3;74 err = 0; 75 75 PRINT_ERR("aubio was not compiled with aubio_sink_apple_audio\n"); 76 76 #endif /* HAVE_SINK_APPLE_AUDIO */ -
tests/src/io/test-sink_apple_audio.c
rc0ce78f r8968ea7 11 11 12 12 if (argc < 3) { 13 err = 2;14 PRINT_ERR("not enough arguments\n");13 PRINT_ERR("not enough arguments, running tests\n"); 14 err = run_on_default_source_and_sink(main); 15 15 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]); 16 16 return err; … … 61 61 beach_fvec: 62 62 #else /* HAVE_SINK_APPLE_AUDIO */ 63 err = 3;63 err = 0; 64 64 PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n"); 65 65 #endif /* HAVE_SINK_APPLE_AUDIO */ -
tests/src/io/test-sink_sndfile-multi.c
rc0ce78f r8968ea7 11 11 12 12 if (argc < 3) { 13 err = 2;14 PRINT_ERR("not enough arguments\n");13 PRINT_ERR("not enough arguments, running tests\n"); 14 err = run_on_default_source_and_sink(main); 15 15 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [channels] [hop_size]\n", argv[0]); 16 16 return err; … … 72 72 beach_source: 73 73 #else 74 err = 3;74 err = 0; 75 75 PRINT_ERR("aubio was not compiled with aubio_sink_sndfile\n"); 76 76 #endif /* HAVE_SNDFILE */ -
tests/src/io/test-sink_sndfile.c
rc0ce78f r8968ea7 11 11 12 12 if (argc < 3) { 13 err = 2;14 PRINT_ERR("not enough arguments\n");13 PRINT_ERR("not enough arguments, running tests\n"); 14 err = run_on_default_source_and_sink(main); 15 15 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]); 16 16 return err; … … 61 61 beach_fvec: 62 62 #else 63 err = 3;63 err = 0; 64 64 PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n"); 65 65 #endif /* HAVE_SNDFILE */ -
tests/src/io/test-sink_wavwrite-multi.c
rc0ce78f r8968ea7 11 11 12 12 if (argc < 3) { 13 err = 2;14 PRINT_ERR("not enough arguments\n");13 PRINT_ERR("not enough arguments, running tests\n"); 14 err = run_on_default_source_and_sink(main); 15 15 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [channels] [hop_size]\n", argv[0]); 16 16 return err; … … 72 72 beach_source: 73 73 #else 74 err = 3;74 err = 0; 75 75 PRINT_ERR("aubio was not compiled with aubio_sink_wavwrite\n"); 76 76 #endif /* HAVE_WAVWRITE */ -
tests/src/io/test-sink_wavwrite.c
rc0ce78f r8968ea7 11 11 12 12 if (argc < 3) { 13 err = 2;14 PRINT_ERR("not enough arguments\n");13 PRINT_ERR("not enough arguments, running tests\n"); 14 err = run_on_default_source_and_sink(main); 15 15 PRINT_MSG("usage: %s <input_path> <output_path> [samplerate] [hop_size]\n", argv[0]); 16 16 return err; … … 61 61 beach_fvec: 62 62 #else 63 err = 3;63 err = 0; 64 64 PRINT_ERR("aubio was not compiled with aubio_sink_wavwrite\n"); 65 65 #endif /* HAVE_WAVWRITE */ -
tests/src/io/test-source.c
rc0ce78f r8968ea7 6 6 uint_t err = 0; 7 7 if (argc < 2) { 8 err = 2;9 PRINT_ERR("not enough arguments\n");8 PRINT_ERR("not enough arguments, running tests\n"); 9 err = run_on_default_source(main); 10 10 PRINT_MSG("read a wave file as a mono vector\n"); 11 11 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); … … 23 23 uint_t hop_size = 256; 24 24 uint_t n_frames = 0, read = 0; 25 if ( argc == 3 ) samplerate = atoi(argv[2]);26 if ( argc == 4 ) hop_size = atoi(argv[3]);25 if ( argc >= 3 ) samplerate = atoi(argv[2]); 26 if ( argc >= 4 ) hop_size = atoi(argv[3]); 27 27 28 28 char_t *source_path = argv[1]; -
tests/src/io/test-source_apple_audio.c
rc0ce78f r8968ea7 10 10 uint_t err = 0; 11 11 if (argc < 2) { 12 err = 2;13 PRINT_ERR("not enough arguments\n");12 PRINT_ERR("not enough arguments, running tests\n"); 13 err = run_on_default_source(main); 14 14 PRINT_MSG("read a wave file as a mono vector\n"); 15 15 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); … … 28 28 uint_t hop_size = 256; 29 29 uint_t n_frames = 0, read = 0; 30 if ( argc == 3 ) samplerate = atoi(argv[2]);31 if ( argc == 4 ) hop_size = atoi(argv[3]);30 if ( argc >= 3 ) samplerate = atoi(argv[2]); 31 if ( argc >= 4 ) hop_size = atoi(argv[3]); 32 32 33 33 char_t *source_path = argv[1]; … … 57 57 beach: 58 58 #else /* HAVE_SOURCE_APPLE_AUDIO */ 59 err = 3;59 err = 0; 60 60 PRINT_ERR("aubio was not compiled with aubio_source_apple_audio\n"); 61 61 #endif /* HAVE_SOURCE_APPLE_AUDIO */ -
tests/src/io/test-source_avcodec.c
rc0ce78f r8968ea7 10 10 uint_t err = 0; 11 11 if (argc < 2) { 12 err = 2;13 PRINT_ERR("not enough arguments\n");12 PRINT_ERR("not enough arguments, running tests\n"); 13 err = run_on_default_source(main); 14 14 PRINT_MSG("read a wave file as a mono vector\n"); 15 15 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); … … 28 28 uint_t hop_size = 256; 29 29 uint_t n_frames = 0, read = 0; 30 if ( argc == 3 ) samplerate = atoi(argv[2]);31 if ( argc == 4 ) hop_size = atoi(argv[3]);30 if ( argc >= 3 ) samplerate = atoi(argv[2]); 31 if ( argc >= 4 ) hop_size = atoi(argv[3]); 32 32 33 33 char_t *source_path = argv[1]; … … 57 57 beach: 58 58 #else /* HAVE_LIBAV */ 59 err = 3;59 err = 0; 60 60 PRINT_ERR("aubio was not compiled with aubio_source_avcodec\n"); 61 61 #endif /* HAVE_LIBAV */ -
tests/src/io/test-source_multi.c
rc0ce78f r8968ea7 6 6 sint_t err = 0; 7 7 if (argc < 2) { 8 err = -2;9 PRINT_ERR("not enough arguments\n");8 PRINT_ERR("not enough arguments, running tests\n"); 9 err = run_on_default_source(main); 10 10 PRINT_MSG("read a wave file as a mono vector\n"); 11 11 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); -
tests/src/io/test-source_seek.c
rc0ce78f r8968ea7 6 6 uint_t err = 0; 7 7 if (argc < 2) { 8 err = 2;9 PRINT_ERR("not enough arguments\n");8 PRINT_ERR("not enough arguments, running tests\n"); 9 err = run_on_default_source(main); 10 10 PRINT_MSG("read a wave file as a mono vector\n"); 11 11 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); … … 24 24 uint_t n_frames = 0, read = 0; 25 25 uint_t old_n_frames_1 = 0, old_n_frames_2 = 0, old_n_frames_3 = 0; 26 if ( argc == 3 ) samplerate = atoi(argv[2]);27 if ( argc == 4 ) hop_size = atoi(argv[3]);26 if ( argc >= 3 ) samplerate = atoi(argv[2]); 27 if ( argc >= 4 ) hop_size = atoi(argv[3]); 28 28 29 29 char_t *source_path = argv[1]; -
tests/src/io/test-source_sndfile.c
rc0ce78f r8968ea7 10 10 uint_t err = 0; 11 11 if (argc < 2) { 12 err = 2;13 PRINT_ERR("not enough arguments\n");12 PRINT_ERR("not enough arguments, running tests\n"); 13 err = run_on_default_source(main); 14 14 PRINT_MSG("read a wave file as a mono vector\n"); 15 15 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); … … 28 28 uint_t hop_size = 256; 29 29 uint_t n_frames = 0, read = 0; 30 if ( argc == 3 ) samplerate = atoi(argv[2]);31 if ( argc == 4 ) hop_size = atoi(argv[3]);30 if ( argc >= 3 ) samplerate = atoi(argv[2]); 31 if ( argc >= 4 ) hop_size = atoi(argv[3]); 32 32 33 33 char_t *source_path = argv[1]; … … 57 57 beach: 58 58 #else 59 err = 3;59 err = 0; 60 60 PRINT_ERR("aubio was not compiled with aubio_source_sndfile\n"); 61 61 #endif /* HAVE_SNDFILE */ -
tests/src/io/test-source_wavread.c
rc0ce78f r8968ea7 10 10 uint_t err = 0; 11 11 if (argc < 2) { 12 err = 2;13 PRINT_ERR("not enough arguments\n");12 PRINT_ERR("not enough arguments, running tests\n"); 13 err = run_on_default_source(main); 14 14 PRINT_MSG("read a wave file as a mono vector\n"); 15 15 PRINT_MSG("usage: %s <source_path> [samplerate] [hop_size]\n", argv[0]); … … 28 28 uint_t hop_size = 256; 29 29 uint_t n_frames = 0, read = 0; 30 if ( argc == 3 ) samplerate = atoi(argv[2]);31 if ( argc == 4 ) hop_size = atoi(argv[3]);30 if ( argc >= 3 ) samplerate = atoi(argv[2]); 31 if ( argc >= 4 ) hop_size = atoi(argv[3]); 32 32 33 33 char_t *source_path = argv[1]; … … 36 36 aubio_source_wavread_t * s = 37 37 new_aubio_source_wavread(source_path, samplerate, hop_size); 38 39 38 if (!s) { err = 1; goto beach; } 40 39 fvec_t *vec = new_fvec(hop_size); … … 58 57 beach: 59 58 #else 60 err = 3;59 err = 0; 61 60 PRINT_ERR("aubio was not compiled with aubio_source_wavread\n"); 62 61 #endif /* HAVE_WAVREAD */
Note: See TracChangeset
for help on using the changeset viewer.