using Ryujinx.Audio.Renderer.Server.Effect;
using Ryujinx.Common.Memory;
using System.Runtime.InteropServices;
namespace Ryujinx.Audio.Renderer.Parameter.Effect
{
/// <summary>
/// <see cref="IEffectInParameter.SpecificData"/> for <see cref="Common.EffectType.Delay"/>.
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
public struct DelayParameter
/// The input channel indices that will be used by the <see cref="Dsp.AudioProcessor"/>.
public Array6<byte> Input;
/// The output channel indices that will be used by the <see cref="Dsp.AudioProcessor"/>.
public Array6<byte> Output;
/// The maximum number of channels supported.
public ushort ChannelCountMax;
/// The total channel count used.
public ushort ChannelCount;
/// The maximum delay time in milliseconds.
public uint DelayTimeMax;
/// The delay time in milliseconds.
public uint DelayTime;
/// The target sample rate. (Q15)
public uint SampleRate;
/// The input gain. (Q15)
public uint InGain;
/// The feedback gain. (Q15)
public uint FeedbackGain;
/// The output gain. (Q15)
public uint OutGain;
/// The dry gain. (Q15)
public uint DryGain;
/// The channel spread of the <see cref="FeedbackGain"/>. (Q15)
public uint ChannelSpread;
/// The low pass amount. (Q15)
public uint LowPassAmount;
/// The current usage status of the effect on the client side.
public UsageState Status;
/// Check if the <see cref="ChannelCount"/> is valid.
/// <returns>Returns true if the <see cref="ChannelCount"/> is valid.</returns>
public bool IsChannelCountValid()
return EffectInParameterVersion1.IsChannelCountValid(ChannelCount);
}
/// Check if the <see cref="ChannelCountMax"/> is valid.
/// <returns>Returns true if the <see cref="ChannelCountMax"/> is valid.</returns>
public bool IsChannelCountMaxValid()
return EffectInParameterVersion1.IsChannelCountValid(ChannelCountMax);