Changeset f14a78d


Ignore:
Timestamp:
Sep 8, 2007, 4:12:31 PM (17 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
38837b1
Parents:
b276dee
Message:

filterbank.c: make sure we never write out of input/output vectors in aubio_filterbank_do

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/filterbank.c

    rb276dee rf14a78d  
    170170void aubio_filterbank_do(aubio_filterbank_t * f, cvec_t * in, fvec_t *out) {
    171171  uint_t n, filter_cnt;
    172   for(filter_cnt = 0; filter_cnt < f->n_filters; filter_cnt++){
     172  for(filter_cnt = 0; (filter_cnt < f->n_filters)
     173    && (filter_cnt < out->length); filter_cnt++){
    173174      out->data[0][filter_cnt] = 0.f;
    174       for(n = 0; n < f->win_s; n++){
     175      for(n = 0; n < in->length; n++){
    175176          out->data[0][filter_cnt] += in->norm[0][n]
    176177            * f->filters[filter_cnt]->data[0][n];
Note: See TracChangeset for help on using the changeset viewer.