From 10b11d6703e5a46c751dd84a1e1af955e036efe2 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 21 Feb 2014 13:07:12 -0300 Subject: [PATCH] src/onset/onset.c: add get_threshold --- src/onset/onset.c | 4 ++++ src/onset/onset.h | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/onset/onset.c b/src/onset/onset.c index 83236552..9bc3f1b3 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -104,6 +104,10 @@ uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold) { return AUBIO_OK; } +smpl_t aubio_onset_get_threshold(aubio_onset_t * o) { + return aubio_peakpicker_get_threshold(o->pp); +} + uint_t aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi) { o->minioi = minioi; return AUBIO_OK; diff --git a/src/onset/onset.h b/src/onset/onset.h index b66a0381..47cdbfc7 100644 --- a/src/onset/onset.h +++ b/src/onset/onset.h @@ -257,6 +257,14 @@ smpl_t aubio_onset_get_delay_s(aubio_onset_t * o); */ smpl_t aubio_onset_get_delay_ms(aubio_onset_t * o); +/** get onset peak picking threshold + + \param o onset detection object as returned by new_aubio_onset() + \return current onset detection threshold + +*/ +smpl_t aubio_onset_get_threshold(aubio_onset_t * o); + /** delete onset detection object \param o onset detection object to delete -- 2.11.0