ref: d9ab9584ff89661bc8a38cff6b93e1a72b6dae14
parent: 3a6aa7995e698ef17f6dde2cc9aad331dcb7874d
author: Paul Brossier <piem@piem.org>
date: Sun Jul 15 08:20:03 EDT 2012
tests/src/io/test-sink_sndfile.c: update and simplify
--- a/tests/src/io/test-sink_sndfile.c
+++ b/tests/src/io/test-sink_sndfile.c
@@ -11,20 +11,15 @@
uint_t samplerate = 44100;
uint_t hop_size = 512;
uint_t read = hop_size;
- uint_t written = 512;
fvec_t *vec = new_fvec(hop_size);
aubio_source_sndfile_t * i = new_aubio_source_sndfile(path, samplerate, hop_size);
- aubio_sink_sndfile_t * o = new_aubio_sink_sndfile(outpath, samplerate, hop_size);
+ aubio_sink_sndfile_t * o = new_aubio_sink_sndfile(outpath, samplerate);
if (!i || !o) { err = -1; goto beach; }
while ( read == hop_size ) {
aubio_source_sndfile_do(i, vec, &read);
- if (read == 0) break;
- written = read;
- aubio_sink_sndfile_do(o, vec, &written);
- if (read != written)
- fprintf(stderr, "ERR: read %d, but wrote %d\n", read, written);
+ aubio_sink_sndfile_do(o, vec, read);
}
beach: