using Ryujinx.Common.Memory;
using System.Runtime.InteropServices;
namespace Ryujinx.Audio.Renderer.Parameter.Effect
{
///
/// Effect result state for .
///
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct CompressorStatistics
{
///
/// Maximum input mean value since last reset.
///
public float MaximumMean;
///
/// Minimum output gain since last reset.
///
public float MinimumGain;
///
/// Last processed input sample, per channel.
///
public Array6 LastSamples;
///
/// Reset the statistics.
///
/// Number of channels to reset.
public void Reset(ushort channelCount)
{
MaximumMean = 0.0f;
MinimumGain = 1.0f;
LastSamples.AsSpan()[..channelCount].Clear();
}
}
}