shithub: aubio

Download patch

ref: 998d4d653bc7786c32cc24490ea3629a4fd8709f
parent: b9c3cd2e6bbe71568a263e757036193254316f66
author: Paul Brossier <[email protected]>
date: Wed Nov 4 19:26:06 EST 2009

src/aubio.h: fix typo, improve code example

--- 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