AuxiliaryBufferParameter.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. using Ryujinx.Common.Memory;
  2. using System.Runtime.InteropServices;
  3. namespace Ryujinx.Audio.Renderer.Parameter.Effect
  4. {
  5. /// <summary>
  6. /// <see cref="IEffectInParameter.SpecificData"/> for <see cref="Common.EffectType.AuxiliaryBuffer"/> and <see cref="Common.EffectType.CaptureBuffer"/>.
  7. /// </summary>
  8. [StructLayout(LayoutKind.Sequential, Pack = 1)]
  9. public struct AuxiliaryBufferParameter
  10. {
  11. /// <summary>
  12. /// The input channel indices that will be used by the <see cref="Dsp.AudioProcessor"/> to write data to <see cref="SendBufferInfoAddress"/>.
  13. /// </summary>
  14. public Array24<byte> Input;
  15. /// <summary>
  16. /// The output channel indices that will be used by the <see cref="Dsp.AudioProcessor"/> to read data from <see cref="ReturnBufferInfoAddress"/>.
  17. /// </summary>
  18. public Array24<byte> Output;
  19. /// <summary>
  20. /// The total channel count used.
  21. /// </summary>
  22. public uint ChannelCount;
  23. /// <summary>
  24. /// The target sample rate.
  25. /// </summary>
  26. public uint SampleRate;
  27. /// <summary>
  28. /// The buffer storage total size.
  29. /// </summary>
  30. public uint BufferStorageSize;
  31. /// <summary>
  32. /// The maximum number of channels supported.
  33. /// </summary>
  34. /// <remarks>This is unused.</remarks>
  35. public uint ChannelCountMax;
  36. /// <summary>
  37. /// The address of the start of the region containing two <see cref="Dsp.State.AuxiliaryBufferHeader"/> followed by the data that will be written by the <see cref="Dsp.AudioProcessor"/>.
  38. /// </summary>
  39. public ulong SendBufferInfoAddress;
  40. /// <summary>
  41. /// The address of the start of the region containling data that will be written by the <see cref="Dsp.AudioProcessor"/>.
  42. /// </summary>
  43. /// <remarks>This is unused.</remarks>
  44. public ulong SendBufferStorageAddress;
  45. /// <summary>
  46. /// The address of the start of the region containing two <see cref="Dsp.State.AuxiliaryBufferHeader"/> followed by the data that will be read by the <see cref="Dsp.AudioProcessor"/>.
  47. /// </summary>
  48. /// <remarks>Unused with <see cref="Common.EffectType.CaptureBuffer"/>.</remarks>
  49. public ulong ReturnBufferInfoAddress;
  50. /// <summary>
  51. /// The address of the start of the region containling data that will be read by the <see cref="Dsp.AudioProcessor"/>.
  52. /// </summary>
  53. /// <remarks>This is unused.</remarks>
  54. public ulong ReturnBufferStorageAddress;
  55. /// <summary>
  56. /// Size of a sample of the mix buffer.
  57. /// </summary>
  58. /// <remarks>This is unused.</remarks>
  59. public uint MixBufferSampleSize;
  60. /// <summary>
  61. /// The total count of sample that can be stored.
  62. /// </summary>
  63. /// <remarks>This is unused.</remarks>
  64. public uint TotalSampleCount;
  65. /// <summary>
  66. /// The count of sample of the mix buffer.
  67. /// </summary>
  68. /// <remarks>This is unused.</remarks>
  69. public uint MixBufferSampleCount;
  70. }
  71. }