shithub: aubio

Download patch

ref: f1b925e4562c3abc3d4674319791aa605852eacf
parent: 0a257a6fad4eabe86054d3bec9182b6e1b2b49fd
author: Paul Brossier <[email protected]>
date: Fri Oct 16 00:26:05 EDT 2009

src/onset/peakpick.{c,h}: setters to return uint

--- a/src/onset/peakpick.c
+++ b/src/onset/peakpick.c
@@ -126,9 +126,9 @@
 }
 
 /** function added by Miguel Ramirez to return the onset detection amplitude in peakval */
-void aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold) {
+uint_t aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold) {
 	p->threshold = threshold;
-	return;
+	return AUBIO_OK;
 }
 
 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p) {
@@ -135,9 +135,9 @@
 	return p->threshold;
 }
 
-void aubio_peakpicker_set_thresholdfn(aubio_peakpicker_t * p, aubio_thresholdfn_t thresholdfn) {
+uint_t aubio_peakpicker_set_thresholdfn(aubio_peakpicker_t * p, aubio_thresholdfn_t thresholdfn) {
 	p->thresholdfn = thresholdfn;
-	return;
+	return AUBIO_OK;
 }
 
 aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_peakpicker_t * p) {
--- a/src/onset/peakpick.h
+++ b/src/onset/peakpick.h
@@ -47,11 +47,11 @@
 void del_aubio_peakpicker(aubio_peakpicker_t * p);
 
 /** set peak picking threshold */
-void aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);
+uint_t aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);
 /** get peak picking threshold */
 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p);
 /** set peak picker thresholding function */
-void aubio_peakpicker_set_thresholdfn(aubio_peakpicker_t * p, aubio_thresholdfn_t thresholdfn);
+uint_t aubio_peakpicker_set_thresholdfn(aubio_peakpicker_t * p, aubio_thresholdfn_t thresholdfn);
 /** get peak picker thresholding function */
 aubio_thresholdfn_t aubio_peakpicker_get_thresholdfn(aubio_peakpicker_t * p);