diff options
| author | MerryMage <MerryMage@users.noreply.github.com> | 2017-04-22 09:47:10 +0100 |
|---|---|---|
| committer | MerryMage <MerryMage@users.noreply.github.com> | 2017-04-23 09:18:29 +0100 |
| commit | 24027c1d4adc230121fea67d201265eca9e109a1 (patch) | |
| tree | 1d9c8dc1fc2eb161e5cfa67e205c9efc8a9ed57a /Source/Core/AudioCommon/DPL2Decoder.cpp | |
| parent | d0e75bb438b400b3e24979b1775b8e019fc99bff (diff) | |
DPL2Decoder: Reduce scope of variable in DesignFIR
Diffstat (limited to 'Source/Core/AudioCommon/DPL2Decoder.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/DPL2Decoder.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/AudioCommon/DPL2Decoder.cpp b/Source/Core/AudioCommon/DPL2Decoder.cpp index 8b2f0e53b2..a6b301fc5a 100644 --- a/Source/Core/AudioCommon/DPL2Decoder.cpp +++ b/Source/Core/AudioCommon/DPL2Decoder.cpp @@ -128,7 +128,6 @@ static float* DesignFIR(unsigned int n, float fc, float opt) float k1 = 2 * float(M_PI); // 2*pi*fc1 float k2 = 0.5f * (float)(1 - o); // Constant used if the filter has even length float g = 0.0f; // Gain - float t1; // Temporary variables float fc1; // Cutoff frequencies // Sanity check @@ -162,9 +161,10 @@ static float* DesignFIR(unsigned int n, float fc, float opt) // Create filter for (u32 i = 0; i < end; i++) { - t1 = (float)(i + 1) - k2; - w[end - i - 1] = w[n - end + i] = float(w[end - i - 1] * sin(k1 * t1) / (M_PI * t1)); // Sinc - g += 2 * w[end - i - 1]; // Total gain in filter + float t1 = static_cast<float>(i + 1) - k2; + w[end - i - 1] = w[n - end + i] = + static_cast<float>(w[end - i - 1] * sin(k1 * t1) / (M_PI * t1)); // Sinc + g += 2 * w[end - i - 1]; // Total gain in filter } // Normalize gain |
