Changeset d9ab958 for tests/src/io
- Timestamp:
- Jul 15, 2012, 8:20:03 PM (12 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:
- dd5a052
- Parents:
- 3a6aa799
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/src/io/test-sink_sndfile.c
r3a6aa799 rd9ab958 12 12 uint_t hop_size = 512; 13 13 uint_t read = hop_size; 14 uint_t written = 512;15 14 fvec_t *vec = new_fvec(hop_size); 16 15 aubio_source_sndfile_t * i = new_aubio_source_sndfile(path, samplerate, hop_size); 17 aubio_sink_sndfile_t * o = new_aubio_sink_sndfile(outpath, samplerate , hop_size);16 aubio_sink_sndfile_t * o = new_aubio_sink_sndfile(outpath, samplerate); 18 17 19 18 if (!i || !o) { err = -1; goto beach; } … … 21 20 while ( read == hop_size ) { 22 21 aubio_source_sndfile_do(i, vec, &read); 23 if (read == 0) break; 24 written = read; 25 aubio_sink_sndfile_do(o, vec, &written); 26 if (read != written) 27 fprintf(stderr, "ERR: read %d, but wrote %d\n", read, written); 22 aubio_sink_sndfile_do(o, vec, read); 28 23 } 29 24
Note: See TracChangeset
for help on using the changeset viewer.