CircularBufferParameter.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Ryujinx.Audio.Common;
  2. using Ryujinx.Audio.Renderer.Common;
  3. using Ryujinx.Common.Memory;
  4. using System.Runtime.InteropServices;
  5. using CpuAddress = System.UInt64;
  6. namespace Ryujinx.Audio.Renderer.Parameter.Sink
  7. {
  8. /// <summary>
  9. /// <see cref="SinkInParameter.SpecificData"/> for <see cref="SinkType.CircularBuffer"/>.
  10. /// </summary>
  11. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  12. public struct CircularBufferParameter
  13. {
  14. /// <summary>
  15. /// The CPU address of the user circular buffer.
  16. /// </summary>
  17. public CpuAddress BufferAddress;
  18. /// <summary>
  19. /// The size of the user circular buffer.
  20. /// </summary>
  21. public uint BufferSize;
  22. /// <summary>
  23. /// The total count of channels to output to the circular buffer.
  24. /// </summary>
  25. public uint InputCount;
  26. /// <summary>
  27. /// The target sample count to output per update in the circular buffer.
  28. /// </summary>
  29. public uint SampleCount;
  30. /// <summary>
  31. /// Last read offset on the CPU side.
  32. /// </summary>
  33. public uint LastReadOffset;
  34. /// <summary>
  35. /// The target <see cref="SampleFormat"/>.
  36. /// </summary>
  37. /// <remarks>Only <see cref="SampleFormat.PcmInt16"/> is supported.</remarks>
  38. public SampleFormat SampleFormat;
  39. /// <summary>
  40. /// Reserved/padding.
  41. /// </summary>
  42. private unsafe fixed byte _reserved1[3];
  43. /// <summary>
  44. /// The input channels index that will be used.
  45. /// </summary>
  46. public Array6<byte> Input;
  47. /// <summary>
  48. /// Reserved/padding.
  49. /// </summary>
  50. private ushort _reserved2;
  51. }
  52. }