From 40d47b7aa235b464974480d09875eef0377bb261 Mon Sep 17 00:00:00 2001 From: Mary Date: Thu, 11 May 2023 20:14:02 +0200 Subject: amadeus: Fix wrong channel mapping check and an old typo (#4888) * amadeus: Fix wrong channel mapping check This was always going to happens, as a result quadratic would break and move index after the channel count point, effectively breaking input/output indices. * amadeus: Fix reverb 3d early delay wrong output index --- src/Ryujinx.Audio/Renderer/Dsp/DataSourceHelper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Ryujinx.Audio/Renderer/Dsp/DataSourceHelper.cs') diff --git a/src/Ryujinx.Audio/Renderer/Dsp/DataSourceHelper.cs b/src/Ryujinx.Audio/Renderer/Dsp/DataSourceHelper.cs index 5ca1ddba..721830c9 100644 --- a/src/Ryujinx.Audio/Renderer/Dsp/DataSourceHelper.cs +++ b/src/Ryujinx.Audio/Renderer/Dsp/DataSourceHelper.cs @@ -430,9 +430,9 @@ namespace Ryujinx.Audio.Renderer.Dsp } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void RemapLegacyChannelEffectMappingToChannelResourceMapping(bool isSupported, Span bufferIndices) + public static void RemapLegacyChannelEffectMappingToChannelResourceMapping(bool isSupported, Span bufferIndices, uint channelCount) { - if (!isSupported && bufferIndices.Length == 6) + if (!isSupported && channelCount == 6) { ushort backLeft = bufferIndices[2]; ushort backRight = bufferIndices[3]; @@ -447,9 +447,9 @@ namespace Ryujinx.Audio.Renderer.Dsp } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void RemapChannelResourceMappingToLegacy(bool isSupported, Span bufferIndices) + public static void RemapChannelResourceMappingToLegacy(bool isSupported, Span bufferIndices, uint channelCount) { - if (isSupported && bufferIndices.Length == 6) + if (isSupported && channelCount == 6) { ushort frontCenter = bufferIndices[2]; ushort lowFrequency = bufferIndices[3]; -- cgit v1.2.3