Changeset e5f49af


Ignore:
Timestamp:
Oct 18, 2009, 3:17:20 PM (11 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
bf1c6746
Parents:
56ef7e1
Message:

swig/aubio.i: remove unused extern, update peakpicker

File:
1 edited

Legend:

Unmodified
Added
Removed
  • swig/aubio.i

    r56ef7e1 re5f49af  
    1111
    1212/* fvec */
    13 extern fvec_t * new_fvec(uint_t length, uint_t channels);
    14 extern void del_fvec(fvec_t *s);
     13fvec_t * new_fvec(uint_t length, uint_t channels);
     14void del_fvec(fvec_t *s);
    1515smpl_t fvec_read_sample(fvec_t *s, uint_t channel, uint_t position);
    1616void fvec_write_sample(fvec_t *s, smpl_t data, uint_t channel, uint_t position);
     
    4343
    4444/* cvec */
    45 extern cvec_t * new_cvec(uint_t length, uint_t channels);
    46 extern void del_cvec(cvec_t *s);
    47 extern void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
    48 extern void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
    49 extern smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);
    50 extern smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);
    51 extern void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);
    52 extern void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);
    53 extern smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);
    54 extern smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);
    55 extern smpl_t ** cvec_get_norm(cvec_t *s);
    56 extern smpl_t ** cvec_get_phas(cvec_t *s);
     45cvec_t * new_cvec(uint_t length, uint_t channels);
     46void del_cvec(cvec_t *s);
     47void cvec_write_norm(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
     48void cvec_write_phas(cvec_t *s, smpl_t data, uint_t channel, uint_t position);
     49smpl_t cvec_read_norm(cvec_t *s, uint_t channel, uint_t position);
     50smpl_t cvec_read_phas(cvec_t *s, uint_t channel, uint_t position);
     51void cvec_put_norm_channel(cvec_t *s, smpl_t * data, uint_t channel);
     52void cvec_put_phas_channel(cvec_t *s, smpl_t * data, uint_t channel);
     53smpl_t * cvec_get_norm_channel(cvec_t *s, uint_t channel);
     54smpl_t * cvec_get_phas_channel(cvec_t *s, uint_t channel);
     55smpl_t ** cvec_get_norm(cvec_t *s);
     56smpl_t ** cvec_get_phas(cvec_t *s);
    5757
    5858
    5959/* fft */
    60 extern aubio_fft_t * new_aubio_fft(uint_t size, uint_t channels);
    61 extern void del_aubio_fft(aubio_fft_t * s);
    62 extern void aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum);
    63 extern void aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output);
    64 extern void aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec);
    65 extern void aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output);
    66 extern void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum);
    67 extern void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec);
    68 extern void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum);
    69 extern void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec);
    70 extern void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum);
    71 extern void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec);
     60aubio_fft_t * new_aubio_fft(uint_t size, uint_t channels);
     61void del_aubio_fft(aubio_fft_t * s);
     62void aubio_fft_do (aubio_fft_t *s, fvec_t * input, cvec_t * spectrum);
     63void aubio_fft_rdo (aubio_fft_t *s, cvec_t * spectrum, fvec_t * output);
     64void aubio_fft_do_complex (aubio_fft_t *s, fvec_t * input, fvec_t * compspec);
     65void aubio_fft_rdo_complex (aubio_fft_t *s, fvec_t * compspec, fvec_t * output);
     66void aubio_fft_get_spectrum(fvec_t * compspec, cvec_t * spectrum);
     67void aubio_fft_get_realimag(cvec_t * spectrum, fvec_t * compspec);
     68void aubio_fft_get_phas(fvec_t * compspec, cvec_t * spectrum);
     69void aubio_fft_get_imag(cvec_t * spectrum, fvec_t * compspec);
     70void aubio_fft_get_norm(fvec_t * compspec, cvec_t * spectrum);
     71void aubio_fft_get_real(cvec_t * spectrum, fvec_t * compspec);
    7272
    7373/* filter */
    74 extern aubio_filter_t * new_aubio_filter(uint_t samplerate, uint_t order, uint_t channels);
    75 extern void aubio_filter_do(aubio_filter_t * b, fvec_t * in);
    76 extern void aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out);
    77 extern void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);
    78 extern void del_aubio_filter(aubio_filter_t * b);
    79 
    80 extern aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels);
    81 extern uint_t aubio_filter_set_a_weighting (aubio_filter_t * b);
    82 
    83 extern aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels);
    84 extern uint_t aubio_filter_set_c_weighting (aubio_filter_t * b);
     74aubio_filter_t * new_aubio_filter(uint_t samplerate, uint_t order, uint_t channels);
     75void aubio_filter_do(aubio_filter_t * b, fvec_t * in);
     76void aubio_filter_do_outplace(aubio_filter_t * b, fvec_t * in, fvec_t * out);
     77void aubio_filter_do_filtfilt(aubio_filter_t * b, fvec_t * in, fvec_t * tmp);
     78void del_aubio_filter(aubio_filter_t * b);
     79
     80aubio_filter_t * new_aubio_filter_a_weighting (uint_t samplerate, uint_t channels);
     81uint_t aubio_filter_set_a_weighting (aubio_filter_t * b);
     82
     83aubio_filter_t * new_aubio_filter_c_weighting (uint_t samplerate, uint_t channels);
     84uint_t aubio_filter_set_c_weighting (aubio_filter_t * b);
    8585
    8686/* biquad */
    87 extern aubio_biquad_t * new_aubio_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3);
    88 extern void aubio_biquad_do(aubio_biquad_t * b, fvec_t * in);
    89 extern void aubio_biquad_do_filtfilt(aubio_biquad_t * b, fvec_t * in, fvec_t * tmp);
    90 extern void del_aubio_biquad(aubio_biquad_t * b);
     87aubio_biquad_t * new_aubio_biquad(lsmp_t b1, lsmp_t b2, lsmp_t b3, lsmp_t a2, lsmp_t a3);
     88void aubio_biquad_do(aubio_biquad_t * b, fvec_t * in);
     89void aubio_biquad_do_filtfilt(aubio_biquad_t * b, fvec_t * in, fvec_t * tmp);
     90void del_aubio_biquad(aubio_biquad_t * b);
    9191
    9292/* hist */
    93 extern aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels);
    94 extern void del_aubio_hist(aubio_hist_t *s);
    95 extern void aubio_hist_do(aubio_hist_t *s, fvec_t * input);
    96 extern void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);
    97 extern void aubio_hist_dyn_notnull(aubio_hist_t *s, fvec_t *input);
    98 extern void aubio_hist_weight(aubio_hist_t *s);
    99 extern smpl_t aubio_hist_mean(aubio_hist_t *s);
     93aubio_hist_t * new_aubio_hist(smpl_t flow, smpl_t fhig, uint_t nelems, uint_t channels);
     94void del_aubio_hist(aubio_hist_t *s);
     95void aubio_hist_do(aubio_hist_t *s, fvec_t * input);
     96void aubio_hist_do_notnull(aubio_hist_t *s, fvec_t * input);
     97void aubio_hist_dyn_notnull(aubio_hist_t *s, fvec_t *input);
     98void aubio_hist_weight(aubio_hist_t *s);
     99smpl_t aubio_hist_mean(aubio_hist_t *s);
    100100
    101101/* mathutils */
     
    115115void fvec_alpha_normalise(fvec_t * mag, uint_t alpha);
    116116void fvec_add(fvec_t * mag, smpl_t threshold);
    117 void fvec_adapt_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre);
    118 smpl_t fvec_moving_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre, uint_t pos);
    119 smpl_t fvec_median(fvec_t * input);
     117void fvec_adapt_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre, uint_t channel);
     118smpl_t fvec_moving_thres(fvec_t * vec, fvec_t * tmp, uint_t post, uint_t pre, uint_t pos, uint_t channel);
     119smpl_t fvec_median_channel (fvec_t * input, uint_t channel);
    120120smpl_t fvec_quadint(fvec_t * x,uint_t pos, uint_t span);
    121121smpl_t aubio_quadfrac(smpl_t s0, smpl_t s1, smpl_t s2, smpl_t pf);
     
    147147
    148148/* scale */
    149 extern aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig);
    150 extern uint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);
    151 extern void aubio_scale_do(aubio_scale_t *s, fvec_t * input);
    152 extern void del_aubio_scale(aubio_scale_t *s);
     149aubio_scale_t * new_aubio_scale(smpl_t flow, smpl_t fhig, smpl_t ilow, smpl_t ihig);
     150uint_t aubio_scale_set_limits (aubio_scale_t *s, smpl_t ilow, smpl_t ihig, smpl_t olow, smpl_t ohig);
     151void aubio_scale_do(aubio_scale_t *s, fvec_t * input);
     152void del_aubio_scale(aubio_scale_t *s);
    153153
    154154/* resampling */
    155155#if HAVE_SAMPLERATE
    156 extern aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type);
    157 extern void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input,  fvec_t * output);
    158 extern void del_aubio_resampler(aubio_resampler_t *s);
     156aubio_resampler_t * new_aubio_resampler(float ratio, uint_t type);
     157void aubio_resampler_do (aubio_resampler_t *s, fvec_t * input,  fvec_t * output);
     158void del_aubio_resampler(aubio_resampler_t *s);
    159159#endif /* HAVE_SAMPLERATE */
    160160
     
    199199
    200200/* peakpicker */
    201 aubio_peakpicker_t * new_aubio_peakpicker(smpl_t threshold);
    202 smpl_t aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * df);
     201aubio_peakpicker_t * new_aubio_peakpicker(uint_t channels);
     202void aubio_peakpicker_do(aubio_peakpicker_t * p, fvec_t * df, fvec_t * out);
    203203smpl_t aubio_peakpicker_get_thresholded_input(aubio_peakpicker_t* p);
    204204void del_aubio_peakpicker(aubio_peakpicker_t * p);
     
    238238#include "sndfileio.h"
    239239%}
    240 extern aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);
    241 extern aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);
    242 extern void aubio_sndfile_info(aubio_sndfile_t * file);
    243 extern int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);
    244 extern int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);
    245 extern int del_aubio_sndfile(aubio_sndfile_t * file);
    246 extern uint_t aubio_sndfile_channels(aubio_sndfile_t * file);
    247 extern uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);
     240aubio_sndfile_t * new_aubio_sndfile_ro (const char * inputfile);
     241aubio_sndfile_t * new_aubio_sndfile_wo(aubio_sndfile_t * existingfile, const char * outputname);
     242void aubio_sndfile_info(aubio_sndfile_t * file);
     243int aubio_sndfile_write(aubio_sndfile_t * file, int frames, fvec_t * write);
     244int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t * read);
     245int del_aubio_sndfile(aubio_sndfile_t * file);
     246uint_t aubio_sndfile_channels(aubio_sndfile_t * file);
     247uint_t aubio_sndfile_samplerate(aubio_sndfile_t * file);
    248248%{
    249249#endif /* HAVE_SNDFILE */
Note: See TracChangeset for help on using the changeset viewer.