fb->n_filters = n_filters;
/* allocate filter tables, an fvec of length win_s and of filter_cnt channel */
- fb->filters = new_fvec (win_s, n_filters);
+ fb->filters = new_fvec (win_s / 2 + 1, n_filters);
return fb;
}
/* fill fft_freqs lookup table, which assigns the frequency in hz to each bin */
for (bin = 0; bin < win_s; bin++) {
- fft_freqs->data[0][bin] = aubio_bintofreq (bin, samplerate, win_s);
+ fft_freqs->data[0][bin] = aubio_bintofreq (bin, samplerate, (win_s - 1) * 2);
}
/* zeroing of all filters */