From 32082e50851a80e8ee950a77e00642a8d52cb349 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 7 Dec 2013 14:35:58 -0500 Subject: [PATCH] src/utils/hist.{c,h}: flow/fhig, now ilow/ihig --- src/utils/hist.c | 10 +++++----- src/utils/hist.h | 10 ++++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/utils/hist.c b/src/utils/hist.c index ee44d74d..ea1cb1f5 100644 --- a/src/utils/hist.c +++ b/src/utils/hist.c @@ -38,19 +38,19 @@ struct _aubio_hist_t { /** * Object creation/deletion calls */ -aubio_hist_t * new_aubio_hist (smpl_t ilow, smpl_t ihig, uint_t nelems){ +aubio_hist_t * new_aubio_hist (smpl_t flow, smpl_t fhig, uint_t nelems){ aubio_hist_t * s = AUBIO_NEW(aubio_hist_t); - smpl_t step = (ihig-ilow)/(smpl_t)(nelems); + smpl_t step = (fhig-flow)/(smpl_t)(nelems); smpl_t accum = step; uint_t i; s->nelems = nelems; s->hist = new_fvec(nelems); s->cent = new_fvec(nelems); - /* use scale to map ilow/ihig -> 0/nelems */ - s->scaler = new_aubio_scale(ilow,ihig,0,nelems); + /* use scale to map flow/fhig -> 0/nelems */ + s->scaler = new_aubio_scale(flow,fhig,0,nelems); /* calculate centers now once */ - s->cent->data[0] = ilow + 0.5 * step; + s->cent->data[0] = flow + 0.5 * step; for (i=1; i < s->nelems; i++, accum+=step ) s->cent->data[i] = s->cent->data[0] + accum; diff --git a/src/utils/hist.h b/src/utils/hist.h index 62c52e76..b59fba1f 100644 --- a/src/utils/hist.h +++ b/src/utils/hist.h @@ -36,10 +36,12 @@ extern "C" { typedef struct _aubio_hist_t aubio_hist_t; /** histogram creation - * \param flow minimum input - * \param fhig maximum input - * \param nelems number of histogram columns - */ + + \param flow minimum input + \param fhig maximum input + \param nelems number of histogram columns + +*/ aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems); /** histogram deletion */ void del_aubio_hist(aubio_hist_t *s); -- 2.11.0