From 564e7c33202f487a53cc42f8f77e4abef71cde5c Mon Sep 17 00:00:00 2001 From: "Dr. Dystopia" Date: Wed, 23 Apr 2025 20:41:53 +0200 Subject: [PATCH] UCodes: Make functions `static` --- Source/Core/Core/HW/DSPHLE/UCodes/AXWii.h | 4 ++-- Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/AXWii.h b/Source/Core/Core/HW/DSPHLE/UCodes/AXWii.h index a281734090..b3c43b8012 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/AXWii.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/AXWii.h @@ -49,12 +49,12 @@ protected: // Convert a mixer_control bitfield to our internal representation for that // value. Required because that bitfield has a different meaning in some // versions of AX. - AXMixControl ConvertMixerControl(u32 mixer_control); + static AXMixControl ConvertMixerControl(u32 mixer_control); // Generate a volume ramp from vol1 to vol2, interpolating n volume values. // Uses floating point arithmetic, which isn't exactly what the UCode does, // but this gives better precision and nicer code. - void GenerateVolumeRamp(u16* output, u16 vol1, u16 vol2, size_t nvals); + static void GenerateVolumeRamp(u16* output, u16 vol1, u16 vol2, size_t nvals); void HandleCommandList() override; diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h index 7bc4504f4e..4ebc775ebe 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h +++ b/Source/Core/Core/HW/DSPHLE/UCodes/Zelda.h @@ -56,7 +56,7 @@ private: // Apply volume to a buffer. The volume is a fixed point integer, usually // 1.15 or 4.12 in the DAC UCode. template - void ApplyVolumeInPlace(std::array* buf, u16 vol) + static void ApplyVolumeInPlace(std::array* buf, u16 vol) { for (size_t i = 0; i < N; ++i) { @@ -83,8 +83,8 @@ private: // Note: On a real GC, the stepping happens in 32 steps instead. But hey, // we can do better here with very low risk. Why not? :) template - s32 AddBuffersWithVolumeRamp(std::array* dst, const std::array& src, s32 vol, - s32 step) + static s32 AddBuffersWithVolumeRamp(std::array* dst, const std::array& src, + s32 vol, s32 step) { if (!vol && !step) return vol; @@ -100,7 +100,7 @@ private: // Does not use std::array because it needs to be able to process partial // buffers. Volume is in 1.15 format. - void AddBuffersWithVolume(s16* dst, const s16* src, size_t count, u16 vol) + static void AddBuffersWithVolume(s16* dst, const s16* src, size_t count, u16 vol) { while (count--) { @@ -157,7 +157,7 @@ private: // Raw samples (pre-resampling) that need to be generated to result in 0x50 // post-resampling input samples. - u16 NeededRawSamplesCount(const VPB& vpb); + static u16 NeededRawSamplesCount(const VPB& vpb); // Resamples raw samples to 0x50 input samples, using the resampling ratio // and current position information from the VPB. @@ -185,8 +185,8 @@ private: // behavior. void DownloadRawSamplesFromMRAM(s16* dst, VPB* vpb, u16 requested_samples_count); - void ApplyLowPassFilter(MixingBuffer* buf, VPB* vpb); - void ApplyBiquadFilter(MixingBuffer* buf, VPB* vpb); + static void ApplyLowPassFilter(MixingBuffer* buf, VPB* vpb); + static void ApplyBiquadFilter(MixingBuffer* buf, VPB* vpb); // Applies the reverb effect to Dolby mixed voices based on a set of // per-buffer parameters. Is called twice: once before frame rendering and