diff options
| author | bunnei <bunneidev@gmail.com> | 2018-09-17 09:51:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-17 09:51:47 -0400 |
| commit | 076add4ccddff3940e20fc320615e3d330f77119 (patch) | |
| tree | bacabcfed8665974c276489509a1caa330ad36a2 /src/audio_core/algorithm/interpolate.cpp | |
| parent | 3be048e50a2090caf1eeeb2373c7524ecc177ce8 (diff) | |
| parent | 63c2e32e207d31ecadd9022e1d7cd705c9febac8 (diff) | |
Merge pull request #1326 from FearlessTobi/port-4182
Port #4182 from Citra: "Prefix all size_t with std::"
Diffstat (limited to 'src/audio_core/algorithm/interpolate.cpp')
| -rw-r--r-- | src/audio_core/algorithm/interpolate.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/audio_core/algorithm/interpolate.cpp b/src/audio_core/algorithm/interpolate.cpp index 11459821f..3aea9b0f2 100644 --- a/src/audio_core/algorithm/interpolate.cpp +++ b/src/audio_core/algorithm/interpolate.cpp @@ -14,7 +14,7 @@ namespace AudioCore { /// The Lanczos kernel -static double Lanczos(size_t a, double x) { +static double Lanczos(std::size_t a, double x) { if (x == 0.0) return 1.0; const double px = M_PI * x; @@ -37,15 +37,15 @@ std::vector<s16> Interpolate(InterpolationState& state, std::vector<s16> input, } state.nyquist.Process(input); - constexpr size_t taps = InterpolationState::lanczos_taps; - const size_t num_frames = input.size() / 2; + constexpr std::size_t taps = InterpolationState::lanczos_taps; + const std::size_t num_frames = input.size() / 2; std::vector<s16> output; - output.reserve(static_cast<size_t>(input.size() / ratio + 4)); + output.reserve(static_cast<std::size_t>(input.size() / ratio + 4)); double& pos = state.position; auto& h = state.history; - for (size_t i = 0; i < num_frames; ++i) { + for (std::size_t i = 0; i < num_frames; ++i) { std::rotate(h.begin(), h.end() - 1, h.end()); h[0][0] = input[i * 2 + 0]; h[0][1] = input[i * 2 + 1]; @@ -53,7 +53,7 @@ std::vector<s16> Interpolate(InterpolationState& state, std::vector<s16> input, while (pos <= 1.0) { double l = 0.0; double r = 0.0; - for (size_t j = 0; j < h.size(); j++) { + for (std::size_t j = 0; j < h.size(); j++) { l += Lanczos(taps, pos + j - taps + 1) * h[j][0]; r += Lanczos(taps, pos + j - taps + 1) * h[j][1]; } |
