// // Copyright (c) 2019-2021 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 Reverb3dParameter { /// /// 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; /// /// Reserved/unused. /// private uint _reserved; /// /// The target sample rate. /// /// This is in kHz. public uint SampleRate; /// /// Gain of the room high-frequency effect. /// public float RoomHf; /// /// Reference high frequency. /// public float HfReference; /// /// Reverberation decay time at low frequencies. /// public float DecayTime; /// /// Ratio of the decay time at high frequencies to the decay time at low frequencies. /// public float HfDecayRatio; /// /// Gain of the room effect. /// public float RoomGain; /// /// Gain of the early reflections relative to . /// public float ReflectionsGain; /// /// Gain of the late reverberation relative to . /// public float ReverbGain; /// /// Echo density in the late reverberation decay. /// public float Diffusion; /// /// Modal density in the late reverberation decay. /// public float ReflectionDelay; /// /// Time limit between the early reflections and the late reverberation relative to the time of the first reflection. /// public float ReverbDelayTime; /// /// Modal density in the late reverberation decay. /// public float Density; /// /// The dry gain. /// public float DryGain; /// /// The current usage status of the effect on the client side. /// public UsageState ParameterStatus; /// /// 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); } } }