using Ryujinx.Audio.Common; using Ryujinx.Audio.Renderer.Common; using Ryujinx.Audio.Renderer.Dsp; using Ryujinx.Common.Memory; using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; namespace Ryujinx.Audio.Renderer.Parameter { /// /// Input information for a voice. /// [StructLayout(LayoutKind.Sequential, Size = 0x188, Pack = 1)] public struct VoiceInParameter2 { /// /// Id of the voice. /// public int Id; /// /// Node id of the voice. /// public int NodeId; /// /// Set to true if the voice is new. /// [MarshalAs(UnmanagedType.I1)] public bool IsNew; /// /// Set to true if the voice is used. /// [MarshalAs(UnmanagedType.I1)] public bool InUse; /// /// The voice wanted by the user. /// public PlayState PlayState; /// /// The of the voice. /// public SampleFormat SampleFormat; /// /// The sample rate of the voice. /// public uint SampleRate; /// /// The priority of the voice. /// public uint Priority; /// /// Target sorting position of the voice. (Used to sort voices with the same ) /// public uint SortingOrder; /// /// The total channel count used. /// public uint ChannelCount; /// /// The pitch used on the voice. /// public float Pitch; /// /// The output volume of the voice. /// public float Volume; /// /// Biquad filters to apply to the output of the voice. /// public Array2 BiquadFilters; /// /// Total count of of the voice. /// public uint WaveBuffersCount; /// /// Current playing of the voice. /// public uint WaveBuffersIndex; /// /// Reserved/unused. /// private readonly uint _reserved1; /// /// User state address required by the data source. /// /// Only used for as the address of the GC-ADPCM coefficients. public ulong DataSourceStateAddress; /// /// User state size required by the data source. /// /// Only used for as the size of the GC-ADPCM coefficients. public ulong DataSourceStateSize; /// /// The target mix id of the voice. /// public int MixId; /// /// The target splitter id of the voice. /// public uint SplitterId; /// /// The wavebuffer parameters of this voice. /// public Array4 WaveBuffers; /// /// The channel resource ids associated to the voice. /// public Array6 ChannelResourceIds; /// /// Reset the voice drop flag during voice server update. /// [MarshalAs(UnmanagedType.I1)] public bool ResetVoiceDropFlag; /// /// Flush the amount of wavebuffer specified. This will result in the wavebuffer being skipped and marked played. /// /// This was added on REV5. public byte FlushWaveBufferCount; /// /// Reserved/unused. /// private readonly ushort _reserved2; /// /// Change the behaviour of the voice. /// /// This was added on REV5. public DecodingBehaviour DecodingBehaviourFlags; /// /// Change the Sample Rate Conversion (SRC) quality of the voice. /// /// This was added on REV8. public SampleRateConversionQuality SrcQuality; /// /// This was previously used for opus codec support on the Audio Renderer and was removed on REV3. /// public uint ExternalContext; /// /// This was previously used for opus codec support on the Audio Renderer and was removed on REV3. /// public uint ExternalContextSize; /// /// Reserved/unused. /// private unsafe fixed uint _reserved3[2]; } }