shithub: aubio

Download patch

ref: eb089fbb0fc96a2187629924ec8639c676f2fea9
parent: 422edfb832893f93b9e17a78c25788950c84a028
author: Paul Brossier <piem@piem.org>
date: Tue Oct 6 13:03:23 EDT 2009

swig/aubio.i: update peakpicker interface, escape #if as needed

--- a/swig/aubio.i
+++ b/swig/aubio.i
@@ -61,7 +61,7 @@
 
 
 /* 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 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 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 @@
 
 /* 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);