From 998d4d653bc7786c32cc24490ea3629a4fd8709f Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 5 Nov 2009 00:26:06 +0100 Subject: [PATCH] src/aubio.h: fix typo, improve code example --- src/aubio.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/aubio.h b/src/aubio.h index 15c2ad36..fe3d160b 100644 --- a/src/aubio.h +++ b/src/aubio.h @@ -85,17 +85,21 @@ \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 -- 2.26.2