aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Audio/Renderer/Parameter/Effect/LimiterStatistics.cs
blob: af4c02f2c1adc6af0b7cc4cfb2374dd7e93fd54d (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.ToSpan().Fill(0.0f);
            CompressionGainMin.ToSpan().Fill(1.0f);
        }
    }
}