From 8b285248f7f73e12764df073de9a8e0e1e8209e0 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 2 Oct 2009 01:05:26 +0200 Subject: [PATCH] src/mathutils.c: rename vec_mean to fvec_mean --- src/mathutils.c | 2 +- src/mathutils.h | 2 +- src/onset/onsetdetection.c | 2 +- src/onset/peakpick.c | 4 ++-- swig/aubio.i | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mathutils.c b/src/mathutils.c index 13e0b948..5334d6c7 100644 --- a/src/mathutils.c +++ b/src/mathutils.c @@ -83,7 +83,7 @@ smpl_t aubio_unwrap2pi(smpl_t phase) { return phase + TWO_PI * (1. + FLOOR(-(phase+PI)/TWO_PI)); } -smpl_t vec_mean(fvec_t *s) { +smpl_t fvec_mean(fvec_t *s) { uint_t i,j; smpl_t tmp = 0.0f; for (i=0; i < s->channels; i++) diff --git a/src/mathutils.h b/src/mathutils.h index 59f3342d..1fd05dd9 100644 --- a/src/mathutils.h +++ b/src/mathutils.h @@ -67,7 +67,7 @@ smpl_t aubio_unwrap2pi (smpl_t phase); * * \bug mono */ -smpl_t vec_mean(fvec_t *s); +smpl_t fvec_mean(fvec_t *s); /** returns the max of a vector * * \bug mono diff --git a/src/onset/onsetdetection.c b/src/onset/onsetdetection.c index 2b5dc1a6..ffcc0312 100644 --- a/src/onset/onsetdetection.c +++ b/src/onset/onsetdetection.c @@ -119,7 +119,7 @@ void aubio_onsetdetection_phase(aubio_onsetdetection_t *o, aubio_hist_weight(o->histog); /* its mean is the result */ onset->data[i][0] = aubio_hist_mean(o->histog); - //onset->data[i][0] = vec_mean(o->dev1); + //onset->data[i][0] = fvec_mean(o->dev1); } } diff --git a/src/onset/peakpick.c b/src/onset/peakpick.c index 6b320bd1..8ec84591 100644 --- a/src/onset/peakpick.c +++ b/src/onset/peakpick.c @@ -93,7 +93,7 @@ uint_t aubio_peakpick_pimrt(fvec_t * onset, aubio_pickpeak_t * p) { /* calculate mean and median for onset_proc */ /* for (i=0;ichannels;i++) { */ - mean = vec_mean(onset_proc); + mean = fvec_mean(onset_proc); /* copy to scratch */ for (j = 0; j < length; j++) scratch->data[i][j] = onset_proc->data[i][j]; @@ -160,7 +160,7 @@ aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold) { t->win_post = 5; t->win_pre = 1; - t->thresholdfn = (aubio_thresholdfn_t)(vec_median); /* (vec_mean); */ + t->thresholdfn = (aubio_thresholdfn_t)(vec_median); /* (fvec_mean); */ t->pickerfn = (aubio_pickerfn_t)(vec_peakpick); t->scratch = new_fvec(t->win_post+t->win_pre+1,1); diff --git a/swig/aubio.i b/swig/aubio.i index 8ed5dc18..b3a2a651 100644 --- a/swig/aubio.i +++ b/swig/aubio.i @@ -129,7 +129,7 @@ typedef enum { fvec_t * new_aubio_window(uint_t size, aubio_window_type wintype); smpl_t aubio_unwrap2pi (smpl_t phase); -smpl_t vec_mean(fvec_t *s); +smpl_t fvec_mean(fvec_t *s); smpl_t vec_max(fvec_t *s); smpl_t vec_min(fvec_t *s); uint_t vec_min_elem(fvec_t *s); -- 2.26.2