Skip to content

Commit

Permalink
Remove -1 from centerFrequencies index to stop centerFrequencies[0], …
Browse files Browse the repository at this point in the history
…set earlier in the method, being overwritten
  • Loading branch information
imanders-waracle committed Mar 12, 2019
1 parent c26e500 commit 5e0260a
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 5e0260a

Please sign in to comment.