From: Paul Brossier Date: Sat, 8 Aug 2015 12:37:48 +0000 (+0200) Subject: src/pitch/pitch.c: allow for silence == 0, improve error message X-Git-Tag: 0.4.4~302^2~8 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=973eb75b204be201a98a571866b7f5e9b09cac37;p=aubio.git src/pitch/pitch.c: allow for silence == 0, improve error message --- 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; } }