using Ryujinx.Audio.Renderer.Server.Effect; using Ryujinx.Common.Memory; using System.Runtime.InteropServices; namespace Ryujinx.Audio.Renderer.Parameter.Effect { /// /// for . /// [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct CompressorParameter { /// /// The input channel indices that will be used by the . /// public Array6 Input; /// /// The output channel indices that will be used by the . /// public Array6 Output; /// /// The maximum number of channels supported. /// public ushort ChannelCountMax; /// /// The total channel count used. /// public ushort ChannelCount; /// /// The target sample rate. /// /// This is in kHz. public int SampleRate; /// /// The threshold. /// public float Threshold; /// /// The compressor ratio. /// public float Ratio; /// /// The attack time. /// This is in microseconds. /// public int AttackTime; /// /// The release time. /// This is in microseconds. /// public int ReleaseTime; /// /// The input gain. /// public float InputGain; /// /// The attack coefficient. /// public float AttackCoefficient; /// /// The release coefficient. /// public float ReleaseCoefficient; /// /// The output gain. /// public float OutputGain; /// /// The current usage status of the effect on the client side. /// public UsageState Status; /// /// Indicate if the makeup gain should be used. /// [MarshalAs(UnmanagedType.I1)] public bool MakeupGainEnabled; /// /// Reserved/padding. /// private Array2 _reserved; /// /// Check if the is valid. /// /// Returns true if the is valid. public bool IsChannelCountValid() { return EffectInParameterVersion1.IsChannelCountValid(ChannelCount); } /// /// Check if the is valid. /// /// Returns true if the is valid. public bool IsChannelCountMaxValid() { return EffectInParameterVersion1.IsChannelCountValid(ChannelCountMax); } } }