BehaviourParameter.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using System.Runtime.InteropServices;
  2. namespace Ryujinx.Audio.Renderer.Common
  3. {
  4. /// <summary>
  5. /// Represents the input parameter for <see cref="Server.BehaviourContext"/>.
  6. /// </summary>
  7. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  8. public struct BehaviourParameter
  9. {
  10. /// <summary>
  11. /// The current audio renderer revision in use.
  12. /// </summary>
  13. public int UserRevision;
  14. /// <summary>
  15. /// Reserved/padding.
  16. /// </summary>
  17. private uint _padding;
  18. /// <summary>
  19. /// The flags given controlling behaviour of the audio renderer
  20. /// </summary>
  21. /// <remarks>See <see cref="Server.BehaviourContext.UpdateFlags(ulong)"/> and <see cref="Server.BehaviourContext.IsMemoryPoolForceMappingEnabled"/>.</remarks>
  22. public ulong Flags;
  23. /// <summary>
  24. /// Represents an error during <see cref="Server.AudioRenderSystem.Update(System.Memory{byte}, System.Memory{byte}, System.ReadOnlyMemory{byte})"/>.
  25. /// </summary>
  26. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  27. public struct ErrorInfo
  28. {
  29. /// <summary>
  30. /// The error code to report.
  31. /// </summary>
  32. public ResultCode ErrorCode;
  33. /// <summary>
  34. /// Reserved/padding.
  35. /// </summary>
  36. private uint _padding;
  37. /// <summary>
  38. /// Extra information given with the <see cref="ResultCode"/>
  39. /// </summary>
  40. /// <remarks>This is usually used to report a faulting cpu address when a <see cref="Server.MemoryPool.MemoryPoolState"/> mapping fail.</remarks>
  41. public ulong ExtraErrorInfo;
  42. }
  43. }
  44. }