From 0ce97483b9c3ee9ac4680ddde8ca7f8ef8a6a9f5 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 7 Oct 2009 23:19:36 +0200 Subject: [PATCH] src/utils/scale.c: rename aubio_scale_set to aubio_scale_set_limits --- src/utils/hist.c | 2 +- src/utils/scale.c | 4 ++-- src/utils/scale.h | 2 +- swig/aubio.i | 3 +-- tests/src/test-scale.c | 2 +- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/utils/hist.c b/src/utils/hist.c index 19fced80..d1b5359f 100644 --- a/src/utils/hist.c +++ b/src/utils/hist.c @@ -113,7 +113,7 @@ void aubio_hist_dyn_notnull (aubio_hist_t *s, fvec_t *input) { smpl_t step = (ihig-ilow)/(smpl_t)(s->nelems); /* readapt */ - aubio_scale_set(s->scaler, ilow, ihig, 0, s->nelems); + aubio_scale_set_limits (s->scaler, ilow, ihig, 0, s->nelems); /* recalculate centers */ s->cent->data[0][0] = ilow + 0.5f * step; diff --git a/src/utils/scale.c b/src/utils/scale.c index 8db9007f..58655fce 100644 --- a/src/utils/scale.c +++ b/src/utils/scale.c @@ -39,7 +39,7 @@ struct _aubio_scale_t { aubio_scale_t * new_aubio_scale (smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig) { aubio_scale_t * s = AUBIO_NEW(aubio_scale_t); - aubio_scale_set (s, ilow, ihig, olow, ohig); + aubio_scale_set_limits (s, ilow, ihig, olow, ohig); return s; } @@ -47,7 +47,7 @@ void del_aubio_scale(aubio_scale_t *s) { AUBIO_FREE(s); } -void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, +void aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig) { smpl_t inputrange = ihig - ilow; smpl_t outputrange= ohig - olow; diff --git a/src/utils/scale.h b/src/utils/scale.h index 226bb74a..123c248c 100644 --- a/src/utils/scale.h +++ b/src/utils/scale.h @@ -68,7 +68,7 @@ void aubio_scale_do(aubio_scale_t *s, fvec_t * input); \param ihig higher value of output function */ -void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, +void aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); #ifdef __cplusplus diff --git a/swig/aubio.i b/swig/aubio.i index f68bf2c6..84b851db 100644 --- a/swig/aubio.i +++ b/swig/aubio.i @@ -175,7 +175,7 @@ void aubio_mfcc_do(aubio_mfcc_t *mf, cvec_t *in, fvec_t *out); /* scale */ extern aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig); -extern void aubio_scale_set (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); +extern void aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig); extern void aubio_scale_do(aubio_scale_t *s, fvec_t * input); extern void del_aubio_scale(aubio_scale_t *s); @@ -240,7 +240,6 @@ aubio_pitchdetection_t * new_aubio_pitchdetection(uint_t bufsize, /* pitch mcomb */ aubio_pitchmcomb_t * new_aubio_pitchmcomb(uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate); smpl_t aubio_pitchmcomb_do (aubio_pitchmcomb_t * p, cvec_t * fftgrain); -uint_t aubio_pitch_cands(aubio_pitchmcomb_t * p, cvec_t * fftgrain, smpl_t * cands); void del_aubio_pitchmcomb (aubio_pitchmcomb_t *p); /* pitch yin */ diff --git a/tests/src/test-scale.c b/tests/src/test-scale.c index c35111b5..ee2bfa6e 100644 --- a/tests/src/test-scale.c +++ b/tests/src/test-scale.c @@ -6,7 +6,7 @@ int main(){ uint_t channels = 1; /* number of channel */ fvec_t * in = new_fvec (win_s, channels); /* input buffer */ aubio_scale_t * o = new_aubio_scale(0,1,2,3); - aubio_scale_set(o,0,1,2,3); + aubio_scale_set_limits (o,0,1,2,3); uint_t i = 0; while (i < 1000) { -- 2.26.2