From d9ab9584ff89661bc8a38cff6b93e1a72b6dae14 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sun, 15 Jul 2012 12:20:03 -0600 Subject: [PATCH] tests/src/io/test-sink_sndfile.c: update and simplify --- tests/src/io/test-sink_sndfile.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/src/io/test-sink_sndfile.c b/tests/src/io/test-sink_sndfile.c index b3684600..1e10e14e 100644 --- a/tests/src/io/test-sink_sndfile.c +++ b/tests/src/io/test-sink_sndfile.c @@ -11,20 +11,15 @@ int main(){ 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: -- 2.26.2