//
// Copyright (c) 2019-2020 Ryujinx
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see .
//
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 DelayParameter
{
///
/// 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 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 . (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 is valid.
///
/// Returns true if the is valid.
public bool IsChannelCountValid()
{
return EffectInParameter.IsChannelCountValid(ChannelCount);
}
///
/// Check if the is valid.
///
/// Returns true if the is valid.
public bool IsChannelCountMaxValid()
{
return EffectInParameter.IsChannelCountValid(ChannelCountMax);
}
}
}