From 973eb75b204be201a98a571866b7f5e9b09cac37 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 8 Aug 2015 14:37:48 +0200 Subject: [PATCH] src/pitch/pitch.c: allow for silence == 0, improve error message --- src/pitch/pitch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pitch/pitch.c b/src/pitch/pitch.c index b414b567..02636b40 100644 --- a/src/pitch/pitch.c +++ b/src/pitch/pitch.c @@ -317,11 +317,11 @@ aubio_pitch_set_tolerance (aubio_pitch_t * p, smpl_t tol) 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; } } -- 2.11.0