Changeset 998d4d6


Ignore:
Timestamp:
Nov 5, 2009, 12:26:06 AM (10 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
0bbdbfd
Parents:
b9c3cd2
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/aubio.h

    rb9c3cd2 r998d4d6  
    8686
    8787  // set channels, window size, and sampling rate
    88   uint_t channels = 2, winsize = 1024, samplerate = 44100;
     88  uint_t channels = 2, winsize = 1024, sr = 44100;
    8989  // create a vector
    9090  fvec_t *this_buffer = new_fvec (winsize, channels);
    9191  // create the a-weighting filter
    92   aubio_filter_t *this_filter = new_aubio_filter_weighting (channels, samplerate);
     92  aubio_filter_t *this_filter = new_aubio_filter_a_weighting (channels, sr);
    9393 
    9494  while (running) {
    95     // here some code to pass some data in fvec_t in ...
     95    // here some code to put some data in this_buffer
     96    // ...
     97
    9698    // apply the filter, in place
    9799    aubio_filter_do (this_filter, this_buffer);
    98     // here some code to used the filtered buffer
     100
     101    // here some code to get some data from this_buffer
     102    // ...
    99103  }
    100104 
Note: See TracChangeset for help on using the changeset viewer.