using Ryujinx.Audio.Renderer.Common;
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 ReverbParameter
{
///
/// 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. (Q15)
///
/// This is in kHz.
public int SampleRate;
///
/// The early mode to use.
///
public ReverbEarlyMode EarlyMode;
///
/// The gain to apply to the result of the early reflection. (Q15)
///
public int EarlyGain;
///
/// The pre-delay time in milliseconds. (Q15)
///
public int PreDelayTime;
///
/// The late mode to use.
///
public ReverbLateMode LateMode;
///
/// The gain to apply to the result of the late reflection. (Q15)
///
public int LateGain;
///
/// The decay time. (Q15)
///
public int DecayTime;
///
/// The high frequency decay ratio. (Q15)
///
/// If >= 0.995f, it is considered disabled.
public int HighFrequencyDecayRatio;
///
/// The coloration of the decay. (Q15)
///
public int Coloration;
///
/// The reverb gain. (Q15)
///
public int ReverbGain;
///
/// The output gain. (Q15)
///
public int OutGain;
///
/// The dry gain. (Q15)
///
public int DryGain;
///
/// The current usage status of the effect on the client side.
///
public UsageState Status;
///
/// Check if the is valid.
///
/// Returns true if the is valid.
public readonly bool IsChannelCountValid()
{
return EffectInParameterVersion1.IsChannelCountValid(ChannelCount);
}
///
/// Check if the is valid.
///
/// Returns true if the is valid.
public readonly bool IsChannelCountMaxValid()
{
return EffectInParameterVersion1.IsChannelCountValid(ChannelCountMax);
}
}
}