SplitterInParameterHeader.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Audio.Renderer.Parameter
  3. {
  4. /// <summary>
  5. /// Input header for splitter update.
  6. /// </summary>
  7. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  8. public struct SplitterInParameterHeader
  9. {
  10. /// <summary>
  11. /// Magic of the input header.
  12. /// </summary>
  13. public uint Magic;
  14. /// <summary>
  15. /// The count of <see cref="SplitterInParameter"/> after the header.
  16. /// </summary>
  17. public uint SplitterCount;
  18. /// <summary>
  19. /// The count of splitter destinations after the header and splitter info.
  20. /// </summary>
  21. public uint SplitterDestinationCount;
  22. /// <summary>
  23. /// Reserved/unused.
  24. /// </summary>
  25. private unsafe fixed uint _reserved[5];
  26. /// <summary>
  27. /// The expected constant of any input splitter header.
  28. /// </summary>
  29. private const uint ValidMagic = 0x48444E53;
  30. /// <summary>
  31. /// Check if the magic is valid.
  32. /// </summary>
  33. /// <returns>Returns true if the magic is valid.</returns>
  34. public bool IsMagicValid()
  35. {
  36. return Magic == ValidMagic;
  37. }
  38. }
  39. }