diff options
author | Dan Stowell <danstowell@gmail.com> | 2007-10-09 13:47:58 +0000 |
---|---|---|
committer | Dan Stowell <danstowell@gmail.com> | 2007-10-09 13:47:58 +0000 |
commit | 82c1a63f989c54ce9b57e184f8da31d1d013d119 (patch) | |
tree | 8a3d2d6aef8bb125c04a56797ded81fcc54e3d9f /src/init.c | |
parent | 323fc04cb707d2a4b16e617279f2b82d86a9a2df (diff) | |
download | LibXtract-82c1a63f989c54ce9b57e184f8da31d1d013d119.tar.gz LibXtract-82c1a63f989c54ce9b57e184f8da31d1d013d119.tar.bz2 LibXtract-82c1a63f989c54ce9b57e184f8da31d1d013d119.zip |
Fixed bug in xtract_init_mfcc() - iteration to decide filter peak positions only filled in freq_bands+1 values, when it should fill in freq_bands+2
Diffstat (limited to 'src/init.c')
-rw-r--r-- | src/init.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -69,15 +69,15 @@ int xtract_init_mfcc(int N, float nyquist, int style, float freq_min, float freq fft_peak[0] = lin_peak[0] / nyquist * M; - for (n = 1; n <= freq_bands; n++){ - /*roll out peak locations - mel, linear and linear on fft window scale */ + for (n = 1; n < freq_bands + 2; n++){ + //roll out peak locations - mel, linear and linear on fft window scale mel_peak[n] = mel_peak[n - 1] + freq_bw_mel; lin_peak[n] = 700 * (exp(mel_peak[n] / 1127) -1); fft_peak[n] = lin_peak[n] / nyquist * M; } for (n = 0; n < freq_bands; n++){ - /*roll out normalised gain of each peak*/ + //roll out normalised gain of each peak if (style == XTRACT_EQUAL_GAIN){ height = 1; norm_fact = norm; |