From: Paul Brossier Date: Tue, 29 Sep 2009 05:58:03 +0000 (+0200) Subject: src/temporal: rename adesign/adsgn to a_weighting, idem for c_weighting X-Git-Tag: bzr2git~257 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c159aeb351a4502d0021762294a7dac2ade5ef39;p=aubio.git src/temporal: rename adesign/adsgn to a_weighting, idem for c_weighting --- diff --git a/src/pitch/pitchdetection.c b/src/pitch/pitchdetection.c index 51e86a09..3e9d245d 100644 --- a/src/pitch/pitchdetection.c +++ b/src/pitch/pitchdetection.c @@ -23,7 +23,7 @@ #include "spectral/phasevoc.h" #include "mathutils.h" #include "temporal/filter.h" -#include "temporal/cdesign.h" +#include "temporal/c_weighting.h" #include "pitch/pitchmcomb.h" #include "pitch/pitchyin.h" #include "pitch/pitchfcomb.h" @@ -104,7 +104,7 @@ aubio_pitchdetection_t * new_aubio_pitchdetection(uint_t bufsize, p->pv = new_aubio_pvoc(bufsize, hopsize, channels); p->fftgrain = new_cvec(bufsize, channels); p->mcomb = new_aubio_pitchmcomb(bufsize,hopsize,channels,samplerate); - p->filter = new_aubio_filter_cdsgn (samplerate, channels); + p->filter = new_aubio_filter_c_weighting (samplerate, channels); p->callback = aubio_pitchdetection_mcomb; break; case aubio_pitch_fcomb: diff --git a/src/temporal/adesign.c b/src/temporal/a_weighting.c similarity index 97% rename from src/temporal/adesign.c rename to src/temporal/a_weighting.c index 800f2cd5..6465183f 100644 --- a/src/temporal/adesign.c +++ b/src/temporal/a_weighting.c @@ -24,9 +24,9 @@ #include "fvec.h" #include "lvec.h" #include "temporal/filter.h" -#include "temporal/adesign.h" +#include "temporal/a_weighting.h" -void aubio_filter_set_adsgn (aubio_filter_t * f) { +void aubio_filter_set_a_weighting (aubio_filter_t * f) { uint_t samplerate = aubio_filter_get_samplerate (f); lvec_t *bs = aubio_filter_get_feedforward (f); @@ -152,9 +152,9 @@ void aubio_filter_set_adsgn (aubio_filter_t * f) { } -aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels) { +aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels) { aubio_filter_t * f = new_aubio_filter (samplerate, 7, channels); - aubio_filter_set_adsgn (f); + aubio_filter_set_a_weighting (f); return f; } diff --git a/src/temporal/adesign.h b/src/temporal/a_weighting.h similarity index 93% rename from src/temporal/adesign.h rename to src/temporal/a_weighting.h index 1f621cb4..ed13a80c 100644 --- a/src/temporal/adesign.h +++ b/src/temporal/a_weighting.h @@ -63,14 +63,14 @@ extern "C" { \return a new filter object */ -aubio_filter_t * new_aubio_filter_adsgn (uint_t samplerate, uint_t channels); +aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels); /** set feedback and feedforward coefficients of a A-weighting filter \param f filter object to get coefficients from */ -void aubio_filter_set_adsgn (aubio_filter_t *f); +void aubio_filter_set_a_weighting (aubio_filter_t *f); #ifdef __cplusplus } diff --git a/src/temporal/cdesign.c b/src/temporal/c_weighting.c similarity index 96% rename from src/temporal/cdesign.c rename to src/temporal/c_weighting.c index ee4c7a0d..68847638 100644 --- a/src/temporal/cdesign.c +++ b/src/temporal/c_weighting.c @@ -23,9 +23,9 @@ #include "fvec.h" #include "lvec.h" #include "temporal/filter.h" -#include "temporal/cdesign.h" +#include "temporal/c_weighting.h" -void aubio_filter_set_cdsgn (aubio_filter_t * f) { +void aubio_filter_set_c_weighting (aubio_filter_t * f) { uint_t samplerate = aubio_filter_get_samplerate (f); lvec_t * bs = aubio_filter_get_feedforward (f); @@ -128,9 +128,9 @@ void aubio_filter_set_cdsgn (aubio_filter_t * f) { } -aubio_filter_t * new_aubio_filter_cdsgn (uint_t samplerate, uint_t channels) { +aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels) { aubio_filter_t * f = new_aubio_filter(samplerate, 5, channels); - aubio_filter_set_cdsgn (f); + aubio_filter_set_c_weighting (f); return f; } diff --git a/src/temporal/cdesign.h b/src/temporal/c_weighting.h similarity index 93% rename from src/temporal/cdesign.h rename to src/temporal/c_weighting.h index 49dfeceb..6fa5a0a6 100644 --- a/src/temporal/cdesign.h +++ b/src/temporal/c_weighting.h @@ -63,14 +63,14 @@ extern "C" { \return a new filter object */ -aubio_filter_t * new_aubio_filter_cdsgn (uint_t samplerate, uint_t channels); +aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels); /** set feedback and feedforward coefficients of a C-weighting filter \param f filter object to get coefficients from */ -void aubio_filter_set_cdsgn (aubio_filter_t *f); +void aubio_filter_set_c_weighting (aubio_filter_t *f); #ifdef __cplusplus } diff --git a/src/temporal/filter.h b/src/temporal/filter.h index 0b86befe..2cdbd5ea 100644 --- a/src/temporal/filter.h +++ b/src/temporal/filter.h @@ -52,8 +52,8 @@ operation. Some convenience functions are provided: - - new_aubio_filter_adsgn() and aubio_filter_set_adsgn(), - - new_aubio_filter_cdsgn() and aubio_filter_set_cdsgn(). + - new_aubio_filter_a_weighting() and aubio_filter_set_a_weighting(), + - new_aubio_filter_c_weighting() and aubio_filter_set_c_weighting(). */ diff --git a/tests/src/temporal/test-aweighting.c b/tests/src/temporal/test-aweighting.c index 8694035d..ab23323b 100644 --- a/tests/src/temporal/test-aweighting.c +++ b/tests/src/temporal/test-aweighting.c @@ -10,26 +10,26 @@ int main(){ uint_t channels = 2; for ( samplerate = rates[i]; i < nrates ; i++ ) { - f = new_aubio_filter_adsgn (samplerate, channels); + f = new_aubio_filter_a_weighting (samplerate, channels); del_aubio_filter (f); f = new_aubio_filter (samplerate, 7, channels*2); - aubio_filter_set_adsgn (f); + aubio_filter_set_a_weighting (f); del_aubio_filter (f); } // samplerate unknown - f = new_aubio_filter_adsgn (12089, channels); + f = new_aubio_filter_a_weighting (12089, channels); del_aubio_filter (f); // order to small f = new_aubio_filter (samplerate, 2, channels*2); - aubio_filter_set_adsgn (f); + aubio_filter_set_a_weighting (f); del_aubio_filter (f); // order to big f = new_aubio_filter (samplerate, 12, channels*2); - aubio_filter_set_adsgn (f); + aubio_filter_set_a_weighting (f); del_aubio_filter (f); return 0; diff --git a/tests/src/temporal/test-cweighting.c b/tests/src/temporal/test-cweighting.c index bcf952f8..718e6186 100644 --- a/tests/src/temporal/test-cweighting.c +++ b/tests/src/temporal/test-cweighting.c @@ -10,26 +10,26 @@ int main(){ uint_t channels = 2; for ( samplerate = rates[i]; i < nrates ; i++ ) { - f = new_aubio_filter_cdsgn (samplerate, channels); + f = new_aubio_filter_c_weighting (samplerate, channels); del_aubio_filter (f); f = new_aubio_filter (samplerate, 5, channels*2); - aubio_filter_set_cdsgn (f); + aubio_filter_set_c_weighting (f); del_aubio_filter (f); } // samplerate unknown - f = new_aubio_filter_cdsgn (12089, channels); + f = new_aubio_filter_c_weighting (12089, channels); del_aubio_filter (f); // order to small f = new_aubio_filter (samplerate, 2, channels*2); - aubio_filter_set_cdsgn (f); + aubio_filter_set_c_weighting (f); del_aubio_filter (f); // order to big f = new_aubio_filter (samplerate, 12, channels*2); - aubio_filter_set_cdsgn (f); + aubio_filter_set_c_weighting (f); del_aubio_filter (f); return 0; diff --git a/tests/src/test-filter.c b/tests/src/test-filter.c index 45e67ca7..c2847b52 100644 --- a/tests/src/test-filter.c +++ b/tests/src/test-filter.c @@ -8,7 +8,7 @@ int main(){ fvec_t * out = new_fvec (win_s, channels); /* input buffer */ /* allocate fft and other memory space */ - aubio_filter_t * o = new_aubio_filter_cdsgn (44100, channels); + aubio_filter_t * o = new_aubio_filter_c_weighting (44100, channels); aubio_filter_do(o,in); aubio_filter_do_outplace(o,in,out);