From: Paul Brossier Date: Tue, 9 Aug 2005 08:58:47 +0000 (+0000) Subject: protect window types with aubio_win_ X-Git-Tag: 0.4.0-beta1~1386 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=b4b03247aca9aba8aa82d0ac95a60a77a2c7c838;p=aubio.git protect window types with aubio_win_ --- diff --git a/examples/tests/test-fft.c b/examples/tests/test-fft.c index 5fd57e12..c61e1b5a 100644 --- a/examples/tests/test-fft.c +++ b/examples/tests/test-fft.c @@ -19,7 +19,7 @@ int main(){ for (i=0; i < channels; i++) spec[i] = AUBIO_ARRAY(fft_data_t,win_s); /* initialize the window (see mathutils.c) */ - window(w,win_s,hanningz); + window(w,win_s,aubio_win_hanningz); /* fill input with some data */ diff --git a/src/mathutils.c b/src/mathutils.c index 6adcfcd4..88dce048 100644 --- a/src/mathutils.c +++ b/src/mathutils.c @@ -23,47 +23,47 @@ #include "sample.h" #include "mathutils.h" -void window(smpl_t *w, uint_t size, window_type_t wintype) { +void window(smpl_t *w, uint_t size, aubio_window_type_t wintype) { uint_t i; switch(wintype) { - case rectangle: + case aubio_win_rectangle: for (i=0;idataold = new_fvec (win_s-hop_s, channels); pv->synthold = new_fvec (win_s-hop_s, channels); pv->w = AUBIO_ARRAY(smpl_t,win_s); - window(pv->w,win_s,hanningz); + window(pv->w,win_s,aubio_win_hanningz); pv->channels = channels; pv->hop_s = hop_s; diff --git a/swig/aubio.i b/swig/aubio.i index a8f21ceb..bc654c2c 100644 --- a/swig/aubio.i +++ b/swig/aubio.i @@ -88,18 +88,18 @@ extern void aubio_hist_dyn_notnull (aubio_hist_t *s, fvec_t *input); /* mathutils */ typedef enum { - rectangle, - hamming, - hanning, - hanningz, - blackman, - blackman_harris, - gaussian, - welch, - parzen -} window_type_t; - -void window(smpl_t *w, uint_t size, window_type_t wintype); + aubio_win_rectangle, + aubio_win_hamming, + aubio_win_hanning, + aubio_win_hanningz, + aubio_win_blackman, + aubio_win_blackman_harris, + aubio_win_gaussian, + aubio_win_welch, + aubio_win_parzen +} aubio_window_type_t; + +void window(smpl_t *w, uint_t size, aubio_window_type_t wintype); smpl_t unwrap2pi (smpl_t phase); smpl_t vec_mean(fvec_t *s); smpl_t vec_max(fvec_t *s);