summaryrefslogtreecommitdiff
path: root/src/audio_core/algorithm
diff options
context:
space:
mode:
authorGravatar Lioncash2020-10-15 14:49:45 -0400
committerGravatar Lioncash2020-10-17 19:50:39 -0400
commitbe1954e04cb5a0c3a526f78ed5490a5e65310280 (patch)
tree267db7ae4be88dbbc288fa605e35d4a2a13839f6 /src/audio_core/algorithm
parentMerge pull request #4787 from lioncash/conversion (diff)
downloadyuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.gz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.tar.xz
yuzu-be1954e04cb5a0c3a526f78ed5490a5e65310280.zip
core: Fix clang build
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
Diffstat (limited to 'src/audio_core/algorithm')
-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 699fcb84c..587ee5b7b 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,
167 output.reserve(static_cast<std::size_t>(static_cast<double>(input.size()) / ratio + 167 output.reserve(static_cast<std::size_t>(static_cast<double>(input.size()) / ratio +
168 InterpolationState::taps)); 168 InterpolationState::taps));
169 169
170 for (std::size_t frame{}; frame < num_frames; ++frame) { 170 for (std::size_t frame = 0; frame < num_frames; ++frame) {
171 const std::size_t lut_index{(state.fraction >> 8) * InterpolationState::taps}; 171 const auto lut_index{static_cast<size_t>(state.fraction >> 8) * InterpolationState::taps};
172 172
173 std::rotate(state.history.begin(), state.history.end() - 1, state.history.end()); 173 std::rotate(state.history.begin(), state.history.end() - 1, state.history.end());
174 state.history[0][0] = input[frame * 2 + 0]; 174 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
225 225
226 output[i] = (l0 * s0 + l1 * s1 + l2 * s2 + l3 * s3) >> 15; 226 output[i] = (l0 * s0 + l1 * s1 + l2 * s2 + l3 * s3) >> 15;
227 fraction += pitch; 227 fraction += pitch;
228 index += (fraction >> 15); 228 index += static_cast<size_t>(fraction >> 15);
229 fraction &= 0x7fff; 229 fraction &= 0x7fff;
230 } 230 }
231} 231}