summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/DPL2Decoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/AudioCommon/DPL2Decoder.cpp')
-rw-r--r--Source/Core/AudioCommon/DPL2Decoder.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/Source/Core/AudioCommon/DPL2Decoder.cpp b/Source/Core/AudioCommon/DPL2Decoder.cpp
index a6b301fc5a..6c8be523bf 100644
--- a/Source/Core/AudioCommon/DPL2Decoder.cpp
+++ b/Source/Core/AudioCommon/DPL2Decoder.cpp
@@ -134,16 +134,13 @@ static float* DesignFIR(unsigned int n, float fc, float opt)
if (n == 0)
return nullptr;
- fc = MathUtil::Clamp(fc, 0.001f, 1.0f);
-
float* w = (float*)calloc(sizeof(float), n);
// Get window coefficients
Hamming(n, w);
- fc1 = fc;
// Cutoff frequency must be < 0.5 where 0.5 <=> Fs/2
- fc1 = ((fc1 <= 1.0) && (fc1 > 0.0)) ? fc1 / 2 : 0.25f;
+ fc1 = MathUtil::Clamp(fc, 0.001f, 1.0f) / 2;
k1 *= fc1;
// Low pass filter