projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
deedc49
)
src/pitch/pitch.c: allow for silence == 0, improve error message
author
Paul Brossier
<piem@piem.org>
Sat, 8 Aug 2015 12:37:48 +0000
(14:37 +0200)
committer
Paul Brossier
<piem@piem.org>
Sat, 8 Aug 2015 12:37:48 +0000
(14:37 +0200)
src/pitch/pitch.c
patch
|
blob
|
history
diff --git
a/src/pitch/pitch.c
b/src/pitch/pitch.c
index
b414b56
..
02636b4
100644
(file)
--- 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;
}
}