aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Audio/Renderer/Parameter/Effect/LimiterStatistics.cs
blob: 97e2f39fc31fe6ce851e3f6e3d1586c90943192c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using Ryujinx.Common.Memory;
using System.Runtime.InteropServices;

namespace Ryujinx.Audio.Renderer.Parameter.Effect
{
    /// <summary>
    /// Effect result state for <seealso cref="Common.EffectType.Limiter"/>.
    /// </summary>
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct LimiterStatistics
    {
        /// <summary>
        /// The max input sample value recorded by the limiter.
        /// </summary>
        public Array6<float> InputMax;

        /// <summary>
        /// Compression gain min value.
        /// </summary>
        public Array6<float> CompressionGainMin;

        /// <summary>
        /// Reset the statistics.
        /// </summary>
        public void Reset()
        {
            InputMax.AsSpan().Clear();
            CompressionGainMin.AsSpan().Fill(1.0f);
        }
    }
}