mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-09 04:10:05 +00:00
HLE DSP: Fix sample clamping in SimpleFilter
This commit is contained in:
parent
0c2f076dc4
commit
07f22a17eb
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ std::array<s16, 2> SourceFilters::SimpleFilter::ProcessSample(const std::array<s
|
||||||
std::array<s16, 2> y0;
|
std::array<s16, 2> y0;
|
||||||
for (std::size_t i = 0; i < 2; i++) {
|
for (std::size_t i = 0; i < 2; i++) {
|
||||||
const s32 tmp = (b0 * x0[i] + a1 * y1[i]) >> 15;
|
const s32 tmp = (b0 * x0[i] + a1 * y1[i]) >> 15;
|
||||||
y0[i] = std::clamp(tmp, -32768, 32767);
|
y0[i] = std::clamp(tmp, -32768, 32768);
|
||||||
}
|
}
|
||||||
|
|
||||||
y1 = y0;
|
y1 = y0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue