fix isonset declaration
authorPaul Brossier <piem@altern.org>
Tue, 9 Aug 2005 00:21:08 +0000 (00:21 +0000)
committerPaul Brossier <piem@altern.org>
Tue, 9 Aug 2005 00:21:08 +0000 (00:21 +0000)
src/peakpick.c

index 91d4b387fed97a7dce0ed6447866c62c17744b91..e060c4129d3115a9ba2239815adf3a0f37fd0245 100644 (file)
@@ -121,7 +121,7 @@ uint_t aubio_peakpick_pimrt_wt(fvec_t * onset,  pickparams_t * p, smpl_t* peakva
        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 @@ uint_t aubio_peakpick_pimrt_wt(fvec_t * onset,  pickparams_t * p, smpl_t* peakva
        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 )