aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Audio/Renderer/Dsp/State
diff options
context:
space:
mode:
Diffstat (limited to 'src/Ryujinx.Audio/Renderer/Dsp/State')
-rw-r--r--src/Ryujinx.Audio/Renderer/Dsp/State/CompressorState.cs4
-rw-r--r--src/Ryujinx.Audio/Renderer/Dsp/State/DelayState.cs4
-rw-r--r--src/Ryujinx.Audio/Renderer/Dsp/State/LimiterState.cs2
-rw-r--r--src/Ryujinx.Audio/Renderer/Dsp/State/Reverb3dState.cs2
-rw-r--r--src/Ryujinx.Audio/Renderer/Dsp/State/ReverbState.cs4
5 files changed, 8 insertions, 8 deletions
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/State/CompressorState.cs b/src/Ryujinx.Audio/Renderer/Dsp/State/CompressorState.cs
index 76aff807..9ee57320 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/State/CompressorState.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/State/CompressorState.cs
@@ -3,7 +3,7 @@ using Ryujinx.Audio.Renderer.Parameter.Effect;
namespace Ryujinx.Audio.Renderer.Dsp.State
{
- public class CompressorState
+ public struct CompressorState
{
public ExponentialMovingAverage InputMovingAverage;
public float Unknown4;
@@ -45,7 +45,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.State
CompressorGainReduction = (1.0f - ratio) / Constants.ChannelCountMax;
Unknown10 = threshold - 1.5f;
Unknown14 = threshold + 1.5f;
- OutputGain = FloatingPointHelper.DecibelToLinearExtended(parameter.OutputGain + makeupGain);
+ OutputGain = FloatingPointHelper.DecibelToLinear(parameter.OutputGain + makeupGain);
}
}
}
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/State/DelayState.cs b/src/Ryujinx.Audio/Renderer/Dsp/State/DelayState.cs
index c56fa078..17ad2a40 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/State/DelayState.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/State/DelayState.cs
@@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
namespace Ryujinx.Audio.Renderer.Dsp.State
{
- public class DelayState
+ public struct DelayState
{
public DelayLine[] DelayLines { get; }
public float[] LowPassZ { get; set; }
@@ -53,7 +53,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.State
LowPassBaseGain = 1.0f - LowPassFeedbackGain;
}
- public void UpdateLowPassFilter(ref float tempRawRef, uint channelCount)
+ public readonly void UpdateLowPassFilter(ref float tempRawRef, uint channelCount)
{
for (int i = 0; i < channelCount; i++)
{
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/State/LimiterState.cs b/src/Ryujinx.Audio/Renderer/Dsp/State/LimiterState.cs
index 80d1cb62..1388bfce 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/State/LimiterState.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/State/LimiterState.cs
@@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Audio.Renderer.Dsp.State
{
- public class LimiterState
+ public struct LimiterState
{
public ExponentialMovingAverage[] DetectorAverage;
public ExponentialMovingAverage[] CompressionGainAverage;
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/State/Reverb3dState.cs b/src/Ryujinx.Audio/Renderer/Dsp/State/Reverb3dState.cs
index 5056b750..e83e0d5f 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/State/Reverb3dState.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/State/Reverb3dState.cs
@@ -4,7 +4,7 @@ using System;
namespace Ryujinx.Audio.Renderer.Dsp.State
{
- public class Reverb3dState
+ public struct Reverb3dState
{
private readonly float[] _fdnDelayMinTimes = new float[4] { 5.0f, 6.0f, 13.0f, 14.0f };
private readonly float[] _fdnDelayMaxTimes = new float[4] { 45.704f, 82.782f, 149.94f, 271.58f };
diff --git a/src/Ryujinx.Audio/Renderer/Dsp/State/ReverbState.cs b/src/Ryujinx.Audio/Renderer/Dsp/State/ReverbState.cs
index 2f574f47..f1927b71 100644
--- a/src/Ryujinx.Audio/Renderer/Dsp/State/ReverbState.cs
+++ b/src/Ryujinx.Audio/Renderer/Dsp/State/ReverbState.cs
@@ -5,7 +5,7 @@ using System;
namespace Ryujinx.Audio.Renderer.Dsp.State
{
- public class ReverbState
+ public struct ReverbState
{
private static readonly float[] _fdnDelayTimes = new float[20]
{
@@ -54,7 +54,7 @@ namespace Ryujinx.Audio.Renderer.Dsp.State
// Room
0.70f, 0.68f, 0.70f, 0.68f, 0.70f, 0.68f, 0.70f, 0.68f, 0.68f, 0.68f,
// Chamber
- 0.70f, 0.68f, 0.70f, 0.68f, 0.70f, 0.68f, 0.68f, 0.68f, 0.68f, 0.68f,
+ 0.70f, 0.68f, 0.70f, 0.68f, 0.70f, 0.68f, 0.68f, 0.68f, 0.68f, 0.68f,
// Hall
0.50f, 0.70f, 0.70f, 0.68f, 0.50f, 0.68f, 0.68f, 0.70f, 0.68f, 0.00f,
// Cathedral