VoiceOutStatus.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Audio.Renderer.Parameter
  3. {
  4. /// <summary>
  5. /// Output information about a voice.
  6. /// </summary>
  7. /// <remarks>See <seealso cref="Server.StateUpdater.UpdateVoices(Server.Voice.VoiceContext, System.Memory{Server.MemoryPool.MemoryPoolState})"/></remarks>
  8. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  9. public struct VoiceOutStatus
  10. {
  11. /// <summary>
  12. /// The total amount of samples that was played.
  13. /// </summary>
  14. /// <remarks>This is reset to 0 when a <see cref="Common.WaveBuffer"/> finishes playing and <see cref="Common.WaveBuffer.IsEndOfStream"/> is set.</remarks>
  15. /// <remarks>This is reset to 0 when looping while <see cref="Parameter.VoiceInParameter.DecodingBehaviour.PlayedSampleCountResetWhenLooping"/> is set.</remarks>
  16. public ulong PlayedSampleCount;
  17. /// <summary>
  18. /// The total amount of <see cref="WaveBuffer"/> consumed.
  19. /// </summary>
  20. public uint PlayedWaveBuffersCount;
  21. /// <summary>
  22. /// If set to true, the voice was dropped.
  23. /// </summary>
  24. [MarshalAs(UnmanagedType.I1)]
  25. public bool VoiceDropFlag;
  26. /// <summary>
  27. /// Reserved/unused.
  28. /// </summary>
  29. private unsafe fixed byte _reserved[3];
  30. }
  31. }