diff options
| author | Tillmann Karras <tilkax@gmail.com> | 2022-05-15 05:48:23 +0100 |
|---|---|---|
| committer | Tillmann Karras <tilkax@gmail.com> | 2024-08-24 16:31:59 +0100 |
| commit | 6946f17b8cd4d64ed1dcff9772414f174f36d817 (patch) | |
| tree | 3de4e2faa8808ae8aafc2a5a9d8c685f5625d2ad | |
| parent | 9d2841be10958c92ae5b66b6443ffdb40c0cfa49 (diff) | |
AX: enable low-pass/biquad filtering of Wiimote audio
| -rw-r--r-- | Source/Core/Core/HW/DSPHLE/UCodes/AXStructs.h | 1 | ||||
| -rw-r--r-- | Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AXStructs.h b/Source/Core/Core/HW/DSPHLE/UCodes/AXStructs.h index 8d224c6f57..f819c066aa 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AXStructs.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AXStructs.h @@ -229,6 +229,7 @@ struct PBBiquadFilter union PBInfImpulseResponseWM { + u16 on; // 0: off, 2: biquad, other: low-pass PBLowPassFilter lpf; PBBiquadFilter biquad; }; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h b/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h index 10d93ad7cc..59813ac229 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AXVoice.h @@ -562,6 +562,19 @@ void ProcessVoice(HLEAccelerator* accelerator, PB_TYPE& pb, const AXBuffers& buf // Wiimote mixing. if (pb.remote) { + if (new_filter && pb.remote_iir.on != 0) + { + // Only one filter at most for Wiimotes. + if (pb.remote_iir.on == 2) + { + BiquadFilter(samples, count, pb.remote_iir.biquad); + } + else + { + LowPassFilter(samples, count, pb.remote_iir.lpf); + } + } + // Old AXWii versions process ms per ms. u16 wm_count = count == 96 ? 18 : 6; |
