From 96a96d7b3809281d167ad3ec588111653eb53345 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 20 Sep 2014 10:30:51 -0300 Subject: [PATCH] src/onset/onset.h: add aubio_onset_get_silence() --- src/onset/onset.c | 4 ++++ src/onset/onset.h | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/onset/onset.c b/src/onset/onset.c index 8ffcf1f1..98660aad 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -99,6 +99,10 @@ uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence) { return AUBIO_OK; } +smpl_t aubio_onset_get_silence(aubio_onset_t * o) { + return o->silence; +} + uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold) { aubio_peakpicker_set_threshold(o->pp, threshold); return AUBIO_OK; diff --git a/src/onset/onset.h b/src/onset/onset.h index 9dbe97ae..cda8d9ab 100644 --- a/src/onset/onset.h +++ b/src/onset/onset.h @@ -125,6 +125,15 @@ smpl_t aubio_onset_get_last_ms (aubio_onset_t *o); */ uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence); +/** get onset detection silence threshold + + \param o onset detection object as returned by new_aubio_onset() + + \return current silence threshold + +*/ +smpl_t aubio_onset_get_silence(aubio_onset_t * o); + /** get onset detection function \param o onset detection object as returned by new_aubio_onset() -- 2.11.0