shithub: aubio

Download patch

ref: 63386360cb9f927c05e7c781723cb12413f7941e
parent: f1b6aad60e70a5ae95aa9e3a531827cdbae8d81f
author: Paul Brossier <[email protected]>
date: Fri Oct 16 00:03:03 EDT 2009

src/onset/onset.c: setters to return unsigned ints

--- a/src/onset/onset.c
+++ b/src/onset/onset.c
@@ -71,20 +71,20 @@
   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 */
--- a/src/onset/onset.h
+++ b/src/onset/onset.h
@@ -69,7 +69,7 @@
   \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 @@
   \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 @@
   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