From: Paul Brossier Date: Sun, 15 Jul 2012 18:20:03 +0000 (-0600) Subject: tests/src/io/test-sink_sndfile.c: update and simplify X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d9ab9584ff89661bc8a38cff6b93e1a72b6dae14;p=aubio.git tests/src/io/test-sink_sndfile.c: update and simplify --- 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: