aboutsummaryrefslogtreecommitdiffstats
path: root/alc/effects/fshifter.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-01-17 21:22:53 -0800
committerChris Robinson <[email protected]>2023-01-17 21:22:53 -0800
commitc5d42ceb107fafd0583c49aedc1c63f3beb35663 (patch)
tree69a1f1c2b4b8c21714ecb88b925d46e1d92fedcf /alc/effects/fshifter.cpp
parentbb751ebc4421789219cb05ca8afa4203fb1d1ed7 (diff)
Use a better frequency bin target for pitch shifting
And slightly adjust the Hann window.
Diffstat (limited to 'alc/effects/fshifter.cpp')
-rw-r--r--alc/effects/fshifter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/alc/effects/fshifter.cpp b/alc/effects/fshifter.cpp
index f2c8f967..5d899aed 100644
--- a/alc/effects/fshifter.cpp
+++ b/alc/effects/fshifter.cpp
@@ -62,7 +62,7 @@ std::array<double,HIL_SIZE> InitHannWindow()
for(size_t i{0};i < HIL_SIZE>>1;i++)
{
constexpr double scale{al::numbers::pi / double{HIL_SIZE}};
- const double val{std::sin(static_cast<double>(i+1) * scale)};
+ const double val{std::sin((static_cast<double>(i)+0.5) * scale)};
ret[i] = ret[HIL_SIZE-1-i] = val * val;
}
return ret;