aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs')
-rw-r--r--src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs b/src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs
index d798230c..0b789537 100644
--- a/src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs
+++ b/src/Ryujinx.Audio/Renderer/Server/CommandGenerator.cs
@@ -735,14 +735,26 @@ namespace Ryujinx.Audio.Renderer.Server
}
}
- private void GenerateCompressorEffect(uint bufferOffset, CompressorEffect effect, int nodeId)
+ private void GenerateCompressorEffect(uint bufferOffset, CompressorEffect effect, int nodeId, int effectId)
{
Debug.Assert(effect.Type == EffectType.Compressor);
+ Memory<EffectResultState> dspResultState;
+
+ if (effect.Parameter.StatisticsEnabled)
+ {
+ dspResultState = _effectContext.GetDspStateMemory(effectId);
+ }
+ else
+ {
+ dspResultState = Memory<EffectResultState>.Empty;
+ }
+
_commandBuffer.GenerateCompressorEffect(
bufferOffset,
effect.Parameter,
effect.State,
+ dspResultState,
effect.IsEnabled,
nodeId);
}
@@ -795,7 +807,7 @@ namespace Ryujinx.Audio.Renderer.Server
GenerateCaptureEffect(mix.BufferOffset, (CaptureBufferEffect)effect, nodeId);
break;
case EffectType.Compressor:
- GenerateCompressorEffect(mix.BufferOffset, (CompressorEffect)effect, nodeId);
+ GenerateCompressorEffect(mix.BufferOffset, (CompressorEffect)effect, nodeId, effectId);
break;
default:
throw new NotImplementedException($"Unsupported effect type {effect.Type}");