summaryrefslogtreecommitdiffstats
path: root/src/audio_core/algorithm/interpolate.cpp
diff options
context:
space:
mode:
authorLC <mathew1800@gmail.com>2020-10-21 04:08:53 +0200
committerGitHub <noreply@github.com>2020-10-21 04:08:53 +0200
commit2e74b79e89fe1e6a21fe0d8650844e563b3c32f5 (patch)
tree0dbc65ac86e609ae22087c7be9d4759ac6b73004 /src/audio_core/algorithm/interpolate.cpp
parentkernel: Fix build with recent compiler flag changes (diff)
parentRevert "core: Fix clang build" (diff)
downloadyuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.gz
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.bz2
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.lz
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.xz
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.tar.zst
yuzu-2e74b79e89fe1e6a21fe0d8650844e563b3c32f5.zip
Diffstat (limited to 'src/audio_core/algorithm/interpolate.cpp')
-rw-r--r--src/audio_core/algorithm/interpolate.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/audio_core/algorithm/interpolate.cpp b/src/audio_core/algorithm/interpolate.cpp
index 587ee5b7b..699fcb84c 100644
--- a/src/audio_core/algorithm/interpolate.cpp
+++ b/src/audio_core/algorithm/interpolate.cpp
@@ -167,8 +167,8 @@ std::vector<s16> Interpolate(InterpolationState& state, std::vector<s16> input,
output.reserve(static_cast<std::size_t>(static_cast<double>(input.size()) / ratio +
InterpolationState::taps));
- for (std::size_t frame = 0; frame < num_frames; ++frame) {
- const auto lut_index{static_cast<size_t>(state.fraction >> 8) * InterpolationState::taps};
+ for (std::size_t frame{}; frame < num_frames; ++frame) {
+ const std::size_t lut_index{(state.fraction >> 8) * InterpolationState::taps};
std::rotate(state.history.begin(), state.history.end() - 1, state.history.end());
state.history[0][0] = input[frame * 2 + 0];
@@ -225,7 +225,7 @@ void Resample(s32* output, const s32* input, s32 pitch, s32& fraction, std::size
output[i] = (l0 * s0 + l1 * s1 + l2 * s2 + l3 * s3) >> 15;
fraction += pitch;
- index += static_cast<size_t>(fraction >> 15);
+ index += (fraction >> 15);
fraction &= 0x7fff;
}
}