From: Paul Brossier Date: Wed, 4 Nov 2009 23:26:06 +0000 (+0100) Subject: src/aubio.h: fix typo, improve code example X-Git-Tag: 0.4.0-beta1~570 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=998d4d653bc7786c32cc24490ea3629a4fd8709f;p=aubio.git src/aubio.h: fix typo, improve code example --- 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