From bb06eb751ba8b7316a55d91fa4617d218dfb1f36 Mon Sep 17 00:00:00 2001 From: GreemDev Date: Wed, 6 Aug 2025 18:36:57 -0500 Subject: [PATCH] Revert "fix: Super Mario Party Jamboree audio renderer crashing" This reverts commit c0c021c7a966e32ed39018f8ec00f9f373173b60. This commit was useless, and submitted by a GDKchan-obsessed chronically online lunatic who has disrespected the maintainers of this fork due to petty disagreements of how we run our Discord server. This is my parting gift to you: Stay gone. I'd prefer this code the way it was, because then you didn't touch it. For the record, this commit is literally useless. The behavioral outcome is functionally identical to before the commit. --- src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs b/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs index 1a5802a37..8b497fe2a 100644 --- a/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs +++ b/src/Ryujinx.Audio/Renderer/Dsp/AdpcmHelper.cs @@ -81,14 +81,14 @@ namespace Ryujinx.Audio.Renderer.Dsp [MethodImpl(MethodImplOptions.AggressiveInlining)] private static short GetCoefficientAtIndex(ReadOnlySpan coefficients, int index) { - if ((uint)index < (uint)coefficients.Length) + if ((uint)index >= (uint)coefficients.Length) { - return coefficients[index]; + Logger.Error?.Print(LogClass.AudioRenderer, $"Out of bound read for coefficient at index {index}"); + + return 0; } - Logger.Error?.Print(LogClass.AudioRenderer, $"Out of bound read for coefficient at index {index}"); - - return 0; + return coefficients[index]; } [MethodImpl(MethodImplOptions.AggressiveInlining)]