summaryrefslogtreecommitdiffstats
path: root/src/audio_core/algorithm/filter.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-10-14 00:30:30 +0200
committerGitHub <noreply@github.com>2020-10-14 00:30:30 +0200
commitca416a0fb87ced0e471729fe344b9f34a090e7b5 (patch)
treed1a143eb839744bc1515700c861ec7e5d04d130e /src/audio_core/algorithm/filter.cpp
parentMerge pull request #4786 from lioncash/flags (diff)
parentaudio_core/CMakeLists: Make warnings consistent with core (diff)
downloadyuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.tar
yuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.tar.gz
yuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.tar.bz2
yuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.tar.lz
yuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.tar.xz
yuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.tar.zst
yuzu-ca416a0fb87ced0e471729fe344b9f34a090e7b5.zip
Diffstat (limited to 'src/audio_core/algorithm/filter.cpp')
-rw-r--r--src/audio_core/algorithm/filter.cpp3
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));
}