shithub: aubio

Download patch

ref: c73268a2551636b16dbae7652697361fed4e6e9f
parent: 8d84c0b74f32177bb3256312716ddcf58e0ff098
author: Paul Brossier <piem@altern.org>
date: Mon Aug 8 20:21:08 EDT 2005

fix isonset declaration

--- a/src/peakpick.c
+++ b/src/peakpick.c
@@ -121,7 +121,7 @@
 	fvec_t * scratch    = (fvec_t *)p->scratch;
 	smpl_t mean = 0., median = 0.;
 	uint_t length = p->win_post + p->win_pre + 1;
-	uint_t i = 0, j;
+	uint_t i = 0, j, isonset = 0;
 
 	/* store onset in onset_keep */
 	/* shift all elements but last, then write last */
@@ -155,7 +155,7 @@
 	onset_peek->data[i][2] = 
 		onset_proc->data[i][p->win_post] - median - mean * p->threshold;
 	
-	uint_t isonset = (p->pickerfn)(onset_peek,1);
+	isonset = (p->pickerfn)(onset_peek,1);
 
 	//if ( isonset && peakval != NULL )
 	if ( peakval != NULL )