From eb089fbb0fc96a2187629924ec8639c676f2fea9 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Tue, 6 Oct 2009 17:03:23 +0200 Subject: [PATCH] swig/aubio.i: update peakpicker interface, escape #if as needed --- swig/aubio.i | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/swig/aubio.i b/swig/aubio.i index f9c60a5f..d51e3c5f 100644 --- a/swig/aubio.i +++ b/swig/aubio.i @@ -61,7 +61,7 @@ extern smpl_t ** cvec_get_phas(cvec_t *s); /* sndfile */ -#if HAVE_SNDFILE +%#if HAVE_SNDFILE extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile); extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname); extern void aubio_sndfile_info(aubio_sndfile_t * file); @@ -70,7 +70,7 @@ extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read) extern int del_aubio_sndfile(aubio_sndfile_t * file); extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file); extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file); -#endif /* HAVE_SNDFILE */ +%#endif /* HAVE_SNDFILE */ /* fft */ extern aubio_fft_t * new_aubio_fft(uint_t size, uint_t channels); @@ -180,11 +180,11 @@ extern void aubio_scale_do(aubio_scale_t *s, fvec_t * input); extern void del_aubio_scale(aubio_scale_t *s); /* resampling */ -#if HAVE_LIBSAMPLERATE +%#if HAVE_SAMPLERATE extern aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type); extern uint_t aubio_resampler_process(aubio_resampler_t *s, fvec_t * input, fvec_t * output); extern void del_aubio_resampler(aubio_resampler_t *s); -#endif /* HAVE_LIBSAMPLERATE */ +%#endif /* HAVE_SAMPLERATE */ /* onset detection */ typedef enum { @@ -270,9 +270,8 @@ void del_aubio_pitchfcomb (aubio_pitchfcomb_t *p); /* peakpicker */ aubio_pickpeak_t * new_aubio_peakpicker(smpl_t threshold); -smpl_t aubio_peakpick_pimrt(fvec_t * DF, aubio_pickpeak_t * p); -uint_t aubio_peakpick_pimrt_wt( fvec_t* DF, aubio_pickpeak_t* p, smpl_t* peakval ); -smpl_t aubio_peakpick_pimrt_getval(aubio_pickpeak_t* p); +smpl_t aubio_peakpicker_do(aubio_pickpeak_t * p, fvec_t * df); +smpl_t aubio_peakpicker_get_thresholded_input(aubio_pickpeak_t* p); void del_aubio_peakpicker(aubio_pickpeak_t * p); void aubio_peakpicker_set_threshold(aubio_pickpeak_t * p, smpl_t threshold); smpl_t aubio_peakpicker_get_threshold(aubio_pickpeak_t * p); -- 2.26.2