\code
// set channels, window size, and sampling rate
- uint_t channels = 2, winsize = 1024, samplerate = 44100;
+ uint_t channels = 2, winsize = 1024, sr = 44100;
// create a vector
fvec_t *this_buffer = new_fvec (winsize, channels);
// create the a-weighting filter
- aubio_filter_t *this_filter = new_aubio_filter_weighting (channels, samplerate);
+ aubio_filter_t *this_filter = new_aubio_filter_a_weighting (channels, sr);
while (running) {
- // here some code to pass some data in fvec_t in ...
+ // here some code to put some data in this_buffer
+ // ...
+
// apply the filter, in place
aubio_filter_do (this_filter, this_buffer);
- // here some code to used the filtered buffer
+
+ // here some code to get some data from this_buffer
+ // ...
}
// and free the structures