diff options
author | Lioncash <mathew1800@gmail.com> | 2020-10-13 22:00:33 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-10-13 22:36:58 +0200 |
commit | 9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea (patch) | |
tree | d1a143eb839744bc1515700c861ec7e5d04d130e /src/audio_core/algorithm/filter.cpp | |
parent | Merge pull request #4786 from lioncash/flags (diff) | |
download | yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.tar yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.tar.gz yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.tar.bz2 yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.tar.lz yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.tar.xz yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.tar.zst yuzu-9f9b64d280d50b39c92e8e12c6f45ef78a72b4ea.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio_core/algorithm/filter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/audio_core/algorithm/filter.cpp b/src/audio_core/algorithm/filter.cpp index f65bf64f7..f34a5b9f3 100644 --- a/src/audio_core/algorithm/filter.cpp +++ b/src/audio_core/algorithm/filter.cpp @@ -55,7 +55,8 @@ void Filter::Process(std::vector<s16>& signal) { /// @param total_count The total number of biquads to be cascaded. /// @param index 0-index of the biquad to calculate the Q value for. static double CascadingBiquadQ(std::size_t total_count, std::size_t index) { - const double pole = M_PI * (2 * index + 1) / (4.0 * total_count); + const auto pole = + M_PI * static_cast<double>(2 * index + 1) / (4.0 * static_cast<double>(total_count)); return 1.0 / (2.0 * std::cos(pole)); } |