shithub: aubio

Download patch

ref: 973eb75b204be201a98a571866b7f5e9b09cac37
parent: deedc49e69ac12d0b7c29b1b86326db66724d4c3
author: Paul Brossier <piem@piem.org>
date: Sat Aug 8 10:37:48 EDT 2015

src/pitch/pitch.c: allow for silence == 0, improve error message

--- a/src/pitch/pitch.c
+++ b/src/pitch/pitch.c
@@ -317,11 +317,11 @@
 uint_t
 aubio_pitch_set_silence (aubio_pitch_t * p, smpl_t silence)
 {
-  if (silence < 0 && silence > -200) {
+  if (silence <= 0 && silence >= -200) {
     p->silence = silence;
     return AUBIO_OK;
   } else {
-    AUBIO_ERR("pitch: could do set silence to %.2f", silence);
+    AUBIO_ERR("pitch: could not set silence to %.2f", silence);
     return AUBIO_FAIL;
   }
 }