From: Paul Brossier Date: Fri, 21 Feb 2014 16:07:12 +0000 (-0300) Subject: src/onset/onset.c: add get_threshold X-Git-Tag: 0.4.1~51 X-Git-Url: https://git.aubio.org/?p=aubio.git;a=commitdiff_plain;h=10b11d6703e5a46c751dd84a1e1af955e036efe2 src/onset/onset.c: add get_threshold --- 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