shithub: aubio

Download patch

ref: 10b11d6703e5a46c751dd84a1e1af955e036efe2
parent: 8f14c6e442cc140f47702614feca96038ea448d2
author: Paul Brossier <[email protected]>
date: Fri Feb 21 08:07:12 EST 2014

src/onset/onset.c: add get_threshold

--- a/src/onset/onset.c
+++ b/src/onset/onset.c
@@ -104,6 +104,10 @@
   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;
--- a/src/onset/onset.h
+++ b/src/onset/onset.h
@@ -257,6 +257,14 @@
 */
 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