Changeset a06ab19 for tests/src/io
- Timestamp:
- Sep 30, 2013, 5:18:49 PM (11 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, pitchshift, sampler, timestretch, yinfft+
- Children:
- 6f41b89
- Parents:
- 50e10a9
- git-author:
- Paul Brossier <piem@piem.org> (09/26/13 21:58:00)
- git-committer:
- Paul Brossier <piem@piem.org> (09/30/13 17:18:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/io/test-source_multi.c
r50e10a9 ra06ab19 17 17 PRINT_MSG(" - read file.wav at original samplerate with 4096 blocks\n"); 18 18 PRINT_MSG(" %s file.wav 0 4096 \n", argv[0]); 19 PRINT_MSG(" - read file.wav at original samplerate with 256 frames blocks, mono\n"); 20 PRINT_MSG(" %s file.wav 0 4096 1\n", argv[0]); 19 21 return err; 20 22 } … … 23 25 uint_t hop_size = 256; 24 26 uint_t n_frames = 0, read = 0; 25 if ( argc == 3 ) samplerate = atoi(argv[2]); 26 if ( argc == 4 ) hop_size = atoi(argv[3]); 27 uint_t n_channels = 0; 28 if ( argc >= 3 ) samplerate = atoi(argv[2]); 29 if ( argc >= 4 ) hop_size = atoi(argv[3]); 30 if ( argc >= 5 ) n_channels = atoi(argv[4]); 27 31 28 32 char_t *source_path = argv[1]; … … 31 35 if (!s) { err = -1; goto beach; } 32 36 33 if ( samplerate == 0 ) samplerate = aubio_source_get_samplerate(s);37 if ( samplerate == 0 ) samplerate = aubio_source_get_samplerate(s); 34 38 35 fmat_t *mat = new_fmat(hop_size, aubio_source_get_channels(s) ); 39 if ( n_channels == 0 ) n_channels = aubio_source_get_channels(s); 40 41 fmat_t *mat = new_fmat(hop_size, n_channels); 36 42 37 43 do { … … 41 47 } while ( read == hop_size ); 42 48 43 PRINT_MSG("read %d frames at %dHz (%d blocks) from %s\n", n_frames, samplerate,44 n_frames / hop_size, source_path);49 PRINT_MSG("read %d frames in %d channels at %dHz (%d blocks) from %s\n", 50 n_frames, n_channels, samplerate, n_frames / hop_size, source_path); 45 51 46 52 del_fmat (mat);
Note: See TracChangeset
for help on using the changeset viewer.