Index: swig/aubio.i
===================================================================
--- swig/aubio.i	(revision fe163ad79210270109544d4991b7130667712c8a)
+++ swig/aubio.i	(revision 858cfa7b34a9a932edd72c56297ddd19e5a8a6f7)
@@ -2,10 +2,6 @@
 
 %{
-        #include "aubio.h"
-        #include "aubioext.h"
+#include "aubio.h"
 %}
-
-#include "aubio.h"
-#include "aubioext.h"
 
 /* type aliases */
@@ -60,16 +56,4 @@
 extern smpl_t ** cvec_get_phas(cvec_t *s);
 
-
-/* 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);
-extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);
-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 */
 
 /* fft */
@@ -176,14 +160,14 @@
 /* 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_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);
+extern uint_t 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);
 
 /* resampling */
-%#if HAVE_SAMPLERATE
+#if HAVE_SAMPLERATE
 extern aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type);
 extern void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input,  fvec_t * output);
 extern void del_aubio_resampler(aubio_resampler_t *s);
-%#endif /* HAVE_SAMPLERATE */
+#endif /* HAVE_SAMPLERATE */
 
 /* onset detection */
@@ -202,8 +186,7 @@
     uint_t bufsize, uint_t hopsize, uint_t channels, uint_t samplerate);
 void aubio_pitchdetection_do (aubio_pitchdetection_t * p, fvec_t * ibuf, fvec_t * obuf);
-void aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres);
-void aubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit);
+uint_t aubio_pitchdetection_set_tolerance(aubio_pitchdetection_t *p, smpl_t thres);
+uint_t aubio_pitchdetection_set_unit(aubio_pitchdetection_t *p, char * pitch_unit);
 void del_aubio_pitchdetection(aubio_pitchdetection_t * p);
-
 
 /* pitch mcomb */
@@ -232,12 +215,15 @@
 smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t* p);
 void del_aubio_peakpicker(aubio_peakpicker_t * p);
-void aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);
+uint_t aubio_peakpicker_set_threshold(aubio_peakpicker_t * p, smpl_t threshold);
 smpl_t aubio_peakpicker_get_threshold(aubio_peakpicker_t * p);
 
 /* transient/steady state separation */
-aubio_tss_t * new_aubio_tss(smpl_t thrs, smpl_t alfa, smpl_t beta,
-    uint_t size, uint_t overlap,uint_t channels);
-void del_aubio_tss(aubio_tss_t *s);
-void aubio_tss_do(aubio_tss_t *s, cvec_t * input, cvec_t * trans, cvec_t * stead);
+aubio_tss_t *new_aubio_tss (uint_t win_s, uint_t hop_s, uint_t channels);
+void del_aubio_tss (aubio_tss_t * s);
+void aubio_tss_do (aubio_tss_t * s, cvec_t * input, cvec_t * trans,
+    cvec_t * stead);
+uint_t aubio_tss_set_threshold (aubio_tss_t * o, smpl_t thrs);
+uint_t aubio_tss_set_alpha (aubio_tss_t * o, smpl_t alpha);
+uint_t aubio_tss_set_beta (aubio_tss_t * o, smpl_t beta);
 
 /* beattracking */
@@ -248,2 +234,29 @@
 smpl_t aubio_beattracking_get_confidence(aubio_beattracking_t * p);
 
+/* tempo */
+typedef struct _aubio_tempo_t aubio_tempo_t;
+aubio_tempo_t * new_aubio_tempo (char_t * mode,
+    uint_t buf_size, uint_t hop_size, uint_t channels, uint_t samplerate);
+void aubio_tempo_do (aubio_tempo_t *o, fvec_t * input, fvec_t * tempo);
+uint_t aubio_tempo_set_silence(aubio_tempo_t * o, smpl_t silence);
+uint_t aubio_tempo_set_threshold(aubio_tempo_t * o, smpl_t threshold);
+smpl_t aubio_tempo_get_bpm(aubio_tempo_t * bt);
+smpl_t aubio_tempo_get_confidence(aubio_tempo_t * bt);
+void del_aubio_tempo(aubio_tempo_t * o);
+
+/* sndfile */
+%{
+#if HAVE_SNDFILE
+#include "sndfileio.h"
+%}
+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);
+extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);
+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 */
+%}
