shithub: aubio

Download patch

ref: 2e0106007ac3311b3ca31a309603804c8bd169ff
parent: d4791e577c6be4a777f0f5067a80eaf7be855422
author: Paul Brossier <piem@piem.org>
date: Fri Jan 3 13:42:44 EST 2014

tests/src/io/test-source*.c: always get samplerate

--- a/tests/src/io/test-source.c
+++ b/tests/src/io/test-source.c
@@ -33,7 +33,7 @@
   if (!s) { err = 1; goto beach; }
   fvec_t *vec = new_fvec(hop_size);
 
-  if (samplerate == 0 ) samplerate = aubio_source_get_samplerate(s);
+  samplerate = aubio_source_get_samplerate(s);
 
   do {
     aubio_source_do(s, vec, &read);
--- a/tests/src/io/test-source_apple_audio.c
+++ b/tests/src/io/test-source_apple_audio.c
@@ -38,7 +38,7 @@
   if (!s) { err = 1; goto beach; }
   fvec_t *vec = new_fvec(hop_size);
 
-  if (samplerate == 0 ) samplerate = aubio_source_apple_audio_get_samplerate(s);
+  samplerate = aubio_source_apple_audio_get_samplerate(s);
 
   do {
     aubio_source_apple_audio_do(s, vec, &read);
--- a/tests/src/io/test-source_avcodec.c
+++ b/tests/src/io/test-source_avcodec.c
@@ -39,7 +39,7 @@
   if (!s) { err = 1; goto beach; }
   fvec_t *vec = new_fvec(hop_size);
 
-  if (samplerate == 0 ) samplerate = aubio_source_avcodec_get_samplerate(s);
+  samplerate = aubio_source_avcodec_get_samplerate(s);
 
   do {
     aubio_source_avcodec_do(s, vec, &read);
--- a/tests/src/io/test-source_sndfile.c
+++ b/tests/src/io/test-source_sndfile.c
@@ -39,7 +39,7 @@
   if (!s) { err = 1; goto beach; }
   fvec_t *vec = new_fvec(hop_size);
 
-  if (samplerate == 0 ) samplerate = aubio_source_sndfile_get_samplerate(s);
+  samplerate = aubio_source_sndfile_get_samplerate(s);
 
   do {
     aubio_source_sndfile_do(s, vec, &read);