Skip to content

Commit

Permalink
One less variable
Browse files Browse the repository at this point in the history
  • Loading branch information
VoidXH committed May 22, 2020
1 parent fc02636 commit 3d60664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cavern.QuickEQ/Equalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public PeakingEQ[] GetPeakingEQ(int sampleRate, int bands) {
public static Equalizer CorrectGraph(float[] graph, double startFreq, double endFreq, EQCurve targetCurve, float targetGain,
float resolution = 1 / 3f, float maxGain = 6) {
Equalizer result = new Equalizer();
double startPow = Math.Log10(startFreq), endPow = Math.Log10(endFreq), powRange = (endPow - startPow) / graph.Length,
double startPow = Math.Log10(startFreq), powRange = (Math.Log10(endFreq) - startPow) / graph.Length,
octaveRange = Math.Log(endFreq, 2) - Math.Log(startFreq, 2), bands = octaveRange / resolution + 1;
int windowSize = graph.Length / (int)bands, windowEdge = windowSize / 2;
float[] refGain = targetCurve.GenerateLogCurve(graph.Length, startFreq, endFreq);
Expand Down

0 comments on commit 3d60664

Please sign in to comment.