// // 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.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 bool IsChannelCountValid() { return EffectInParameter.IsChannelCountValid(ChannelCount); } /// /// Check if the is valid. /// /// Returns true if the is valid. public bool IsChannelCountMaxValid() { return EffectInParameter.IsChannelCountValid(ChannelCountMax); } } }