diff options
author | Mary <me@thog.eu> | 2020-11-21 22:52:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-21 22:52:52 +0100 |
commit | 9abdba5539fff9b32aeb71b1c98494c0b21ed9ce (patch) | |
tree | 0279496217bd3d284fd13e107b0635cc71857529 /Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs | |
parent | 25b9cde8be0d9372527a58f3ca74ff86538ce9af (diff) |
amadeus: Fix reverb 3d mono wrong delay line offset (#1742)
This fix reverb 3d mono rendering using -1 instead of 1 for delay line
offset.
I also did some clean up as this value is now used by all channel
variants.
Now Resident Evil 6 goes in-gane.
Diffstat (limited to 'Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs')
-rw-r--r-- | Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs b/Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs index eeb7322a..abac831b 100644 --- a/Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs +++ b/Ryujinx.Audio.Renderer/Dsp/Command/Reverb3dCommand.cs @@ -83,34 +83,28 @@ namespace Ryujinx.Audio.Renderer.Dsp.Command private void ProcessReverb3dMono(Memory<float>[] outputBuffers, ReadOnlyMemory<float>[] inputBuffers, uint sampleCount) { - const int delayLineSampleIndexOffset = -1; - - ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableMono, TargetEarlyDelayLineIndicesTableMono, TargetOutputFeedbackIndicesTableMono, delayLineSampleIndexOffset); + ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableMono, TargetEarlyDelayLineIndicesTableMono, TargetOutputFeedbackIndicesTableMono); } private void ProcessReverb3dStereo(Memory<float>[] outputBuffers, ReadOnlyMemory<float>[] inputBuffers, uint sampleCount) { - const int delayLineSampleIndexOffset = 1; - - ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableStereo, TargetEarlyDelayLineIndicesTableStereo, TargetOutputFeedbackIndicesTableStereo, delayLineSampleIndexOffset); + ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableStereo, TargetEarlyDelayLineIndicesTableStereo, TargetOutputFeedbackIndicesTableStereo); } private void ProcessReverb3dQuadraphonic(Memory<float>[] outputBuffers, ReadOnlyMemory<float>[] inputBuffers, uint sampleCount) { - const int delayLineSampleIndexOffset = 1; - - ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableQuadraphonic, TargetEarlyDelayLineIndicesTableQuadraphonic, TargetOutputFeedbackIndicesTableQuadraphonic, delayLineSampleIndexOffset); + ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableQuadraphonic, TargetEarlyDelayLineIndicesTableQuadraphonic, TargetOutputFeedbackIndicesTableQuadraphonic); } private void ProcessReverb3dSurround(Memory<float>[] outputBuffers, ReadOnlyMemory<float>[] inputBuffers, uint sampleCount) { - const int delayLineSampleIndexOffset = 1; - - ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableSurround, TargetEarlyDelayLineIndicesTableSurround, TargetOutputFeedbackIndicesTableSurround, delayLineSampleIndexOffset); + ProcessReverb3dGeneric(outputBuffers, inputBuffers, sampleCount, OutputEarlyIndicesTableSurround, TargetEarlyDelayLineIndicesTableSurround, TargetOutputFeedbackIndicesTableSurround); } - private void ProcessReverb3dGeneric(Memory<float>[] outputBuffers, ReadOnlyMemory<float>[] inputBuffers, uint sampleCount, ReadOnlySpan<int> outputEarlyIndicesTable, ReadOnlySpan<int> targetEarlyDelayLineIndicesTable, ReadOnlySpan<int> targetOutputFeedbackIndicesTable, int delayLineSampleIndexOffset) + private void ProcessReverb3dGeneric(Memory<float>[] outputBuffers, ReadOnlyMemory<float>[] inputBuffers, uint sampleCount, ReadOnlySpan<int> outputEarlyIndicesTable, ReadOnlySpan<int> targetEarlyDelayLineIndicesTable, ReadOnlySpan<int> targetOutputFeedbackIndicesTable) { + const int delayLineSampleIndexOffset = 1; + ref Reverb3dState state = ref State.Span[0]; bool isMono = Parameter.ChannelCount == 1; |