From: Paul Brossier Date: Fri, 16 Oct 2009 02:03:03 +0000 (+0200) Subject: src/onset/onset.c: setters to return unsigned ints X-Git-Tag: bzr2git~125 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=63386360cb9f927c05e7c781723cb12413f7941e;p=aubio.git src/onset/onset.c: setters to return unsigned ints --- diff --git a/src/onset/onset.c b/src/onset/onset.c index b9064699..0ab45c77 100644 --- a/src/onset/onset.c +++ b/src/onset/onset.c @@ -71,20 +71,20 @@ void aubio_onset_do (aubio_onset_t *o, fvec_t * input, fvec_t * onset) return; } -void aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence) { +uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence) { o->silence = silence; - return; + return AUBIO_OK; } -void aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold) { +uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold) { o->threshold = threshold; aubio_peakpicker_set_threshold(o->pp, o->threshold); - return; + return AUBIO_OK; } -void aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi) { +uint_t aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi) { o->minioi = minioi; - return; + return AUBIO_OK; } /* Allocate memory for an onset detection */ diff --git a/src/onset/onset.h b/src/onset/onset.h index 2ec8803c..6bdd2549 100644 --- a/src/onset/onset.h +++ b/src/onset/onset.h @@ -69,7 +69,7 @@ void aubio_onset_do (aubio_onset_t *o, fvec_t * input, fvec_t * onset); \param silence new silence detection threshold */ -void aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence); +uint_t aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence); /** set onset detection peak picking threshold @@ -77,7 +77,7 @@ void aubio_onset_set_silence(aubio_onset_t * o, smpl_t silence); \param threshold new peak-picking threshold */ -void aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold); +uint_t aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold); /** set minimum inter onset interval @@ -86,7 +86,7 @@ void aubio_onset_set_threshold(aubio_onset_t * o, smpl_t threshold); hop_size/samplerare) */ -void aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi); +uint_t aubio_onset_set_minioi(aubio_onset_t * o, uint_t minioi); /** delete onset detection object