From d626fac50971f6d8cac5097a1bb8b1cfd7c146b3 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 14 Dec 2013 21:09:17 -0500 Subject: [PATCH] examples/aubiopitch.c: use built-in silence --- examples/aubiopitch.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/aubiopitch.c b/examples/aubiopitch.c index 7e85bc38..b86045e7 100644 --- a/examples/aubiopitch.c +++ b/examples/aubiopitch.c @@ -63,8 +63,12 @@ int main(int argc, char **argv) { verbmsg ("tolerance: %f\n", pitch_tolerance); o = new_aubio_pitch (pitch_method, buffer_size, hop_size, samplerate); - if (pitch_tolerance != 0.) aubio_pitch_set_tolerance (o, pitch_tolerance); - if (pitch_unit != NULL) aubio_pitch_set_unit (o, pitch_unit); + if (pitch_tolerance != 0.) + aubio_pitch_set_tolerance (o, pitch_tolerance); + if (silence_threshold != -90.) + aubio_pitch_set_silence (o, silence_threshold); + if (pitch_unit != NULL) + aubio_pitch_set_unit (o, pitch_unit); pitch = new_fvec (1); wavetable = new_aubio_wavetable (samplerate, hop_size); -- 2.11.0