Skip to content

Commit

Permalink
Merge pull request #165 from Waracle/master
Browse files Browse the repository at this point in the history
Bug fix: calculateFilterBanks for loop overwrites centerFrequencies[0] set earlier in the method
  • Loading branch information
JorenSix authored Dec 5, 2019
2 parents fab7d6e + 5e0260a commit d958352
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/be/tarsos/dsp/mfcc/MFCC.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public final void calculateFilterBanks() {
//Calculates te centerfrequencies.
for (int i = 1; i <= amountOfMelFilters; i++) {
float fc = (inverseMel(mel[0] + factor * i) / sampleRate) * samplesPerFrame;
centerFrequencies[i - 1] = Math.round(fc);
centerFrequencies[i] = Math.round(fc);
}

}
Expand Down

0 comments on commit d958352

Please sign in to comment.