diff options
author | Chris Robinson <[email protected]> | 2023-01-17 21:22:53 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-17 21:22:53 -0800 |
commit | c5d42ceb107fafd0583c49aedc1c63f3beb35663 (patch) | |
tree | 69a1f1c2b4b8c21714ecb88b925d46e1d92fedcf /alc/effects/fshifter.cpp | |
parent | bb751ebc4421789219cb05ca8afa4203fb1d1ed7 (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.cpp | 2 |
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; |