aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/fshifter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/effects/fshifter.cpp')
-rw-r--r--alc/effects/fshifter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp
index c015831c..1b935047 100644
--- a/alc/effects/fshifter.cpp
+++ b/alc/effects/fshifter.cpp
@@ -51,7 +51,8 @@ std::array<ALdouble,HIL_SIZE> InitHannWindow()
/* Create lookup table of the Hann window for the desired size, i.e. HIL_SIZE */
for(size_t i{0};i < HIL_SIZE>>1;i++)
{
- const double val{std::sin(al::MathDefs<double>::Pi() * i / double{HIL_SIZE-1})};
+ constexpr double scale{al::MathDefs<double>::Pi() / double{HIL_SIZE-1}};
+ const double val{std::sin(static_cast<double>(i) * scale)};
ret[i] = ret[HIL_SIZE-1-i] = val * val;
}
return ret;