From 90b475908587d6c1520b1db88542907a37429140 Mon Sep 17 00:00:00 2001 From: bylaws <46304689+bylaws@users.noreply.github.com> Date: Sat, 18 Jan 2020 22:29:52 +0000 Subject: [PATCH] Various small audren fixes (#894) * Remove redundant modulo on wave buffer index This is already performed by SetBufferIndex * Correct typo in UpdateDataHeader MixeSize -> MixSize * Remove unused variable in audren 'volume' was unused and 'voice.Volume' was used instead so remove 'volume' --- .../HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs | 1 - .../Audio/AudioRendererManager/Types/UpdateDataHeader.cs | 2 +- .../HOS/Services/Audio/AudioRendererManager/VoiceContext.cs | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs index 379cf2dfb0..b2a07e475d 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/IAudioRenderer.cs @@ -346,7 +346,6 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager int outOffset = 0; int pendingSamples = MixBufferSamplesCount; - float volume = voice.Volume; while (pendingSamples > 0) { diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs index 1c5b2903ff..f4a77f2f92 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/Types/UpdateDataHeader.cs @@ -8,7 +8,7 @@ public int VoiceSize; public int VoiceResourceSize; public int EffectSize; - public int MixeSize; + public int MixSize; public int SinkSize; public int PerformanceManagerSize; public int Unknown24; diff --git a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs index 60fe2e2342..4af04ee008 100644 --- a/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs +++ b/Ryujinx.HLE/HOS/Services/Audio/AudioRendererManager/VoiceContext.cs @@ -108,7 +108,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio.AudioRendererManager if (wb.Looping == 0) { - SetBufferIndex((_bufferIndex + 1) & 3); + SetBufferIndex(_bufferIndex + 1); } _outStatus.PlayedWaveBuffersCount++;