diff options
| author | 2018-08-21 12:32:08 -0400 | |
|---|---|---|
| committer | 2018-08-21 12:32:37 -0400 | |
| commit | 0057a47e41b178d0b47a7e0f50a6f48a36af254d (patch) | |
| tree | 20620f183eb96935506dd3762599692bd1262747 /src/audio_core/algorithm | |
| parent | Merge pull request #1143 from lioncash/inc (diff) | |
| download | yuzu-0057a47e41b178d0b47a7e0f50a6f48a36af254d.tar.gz yuzu-0057a47e41b178d0b47a7e0f50a6f48a36af254d.tar.xz yuzu-0057a47e41b178d0b47a7e0f50a6f48a36af254d.zip | |
audio_core/filter: Add explicit cast to assignment in Process()
Previously this would cause warnings about implicit conversions to s16
from a double
Diffstat (limited to 'src/audio_core/algorithm')
| -rw-r--r-- | src/audio_core/algorithm/filter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio_core/algorithm/filter.cpp b/src/audio_core/algorithm/filter.cpp index 403b8503f..9fcd0614d 100644 --- a/src/audio_core/algorithm/filter.cpp +++ b/src/audio_core/algorithm/filter.cpp | |||
| @@ -46,7 +46,7 @@ void Filter::Process(std::vector<s16>& signal) { | |||
| 46 | out[0][ch] = b0 * in[0][ch] + b1 * in[1][ch] + b2 * in[2][ch] - a1 * out[1][ch] - | 46 | out[0][ch] = b0 * in[0][ch] + b1 * in[1][ch] + b2 * in[2][ch] - a1 * out[1][ch] - |
| 47 | a2 * out[2][ch]; | 47 | a2 * out[2][ch]; |
| 48 | 48 | ||
| 49 | signal[i * 2 + ch] = std::clamp(out[0][ch], -32768.0, 32767.0); | 49 | signal[i * 2 + ch] = static_cast<s16>(std::clamp(out[0][ch], -32768.0, 32767.0)); |
| 50 | } | 50 | } |
| 51 | } | 51 | } |
| 52 | } | 52 | } |