aubio  0.4.9
temporal/test-filter.c
#include <aubio.h>
int main (void)
{
uint_t win_s = 16; // window size
uint_t impulse_at = win_s / 2;
fvec_t *in = new_fvec (win_s); // input buffer
fvec_t *out = new_fvec (win_s); // input buffer
if (new_aubio_filter(0)) return 1;
if (aubio_filter_get_samplerate(o) != 44100) return 1;
if (aubio_filter_set_c_weighting (o, -1) == 0) return 1;
if (aubio_filter_set_c_weighting (0, 32000) == 0) return 1;
in->data[impulse_at] = 0.5;
fvec_print (in);
aubio_filter_do (o, in);
fvec_print (in);
if (aubio_filter_set_a_weighting (o, -1) == 0) return 1;
if (aubio_filter_set_a_weighting (0, 32000) == 0) return 1;
in->data[impulse_at] = 0.5;
fvec_print (in);
fvec_print (out);
in->data[impulse_at] = 0.5;
fvec_print (in);
fvec_print (out);
del_fvec (in);
del_fvec (out);
return 0;
}