RendererSystemContext.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. using Ryujinx.Audio.Renderer.Server.Upsampler;
  2. using System;
  3. namespace Ryujinx.Audio.Renderer.Server
  4. {
  5. /// <summary>
  6. /// Represents a lite version of <see cref="AudioRenderSystem"/> used by the <see cref="Dsp.AudioProcessor"/>
  7. /// </summary>
  8. /// <remarks>
  9. /// This also allows to reduce dependencies on the <see cref="AudioRenderSystem"/> for unit testing.
  10. /// </remarks>
  11. public sealed class RendererSystemContext
  12. {
  13. /// <summary>
  14. /// The session id of the current renderer.
  15. /// </summary>
  16. public int SessionId;
  17. /// <summary>
  18. /// The target channel count for sink.
  19. /// </summary>
  20. /// <remarks>See <see cref="CommandGenerator.GenerateDevice(Sink.DeviceSink, ref Mix.MixState)"/> for usage.</remarks>
  21. public uint ChannelCount;
  22. /// <summary>
  23. /// The total count of mix buffer.
  24. /// </summary>
  25. public uint MixBufferCount;
  26. /// <summary>
  27. /// Instance of the <see cref="BehaviourContext"/> used to derive bug fixes and features of the current audio renderer revision.
  28. /// </summary>
  29. public BehaviourContext BehaviourContext;
  30. /// <summary>
  31. /// Instance of the <see cref="UpsamplerManager"/> used for upsampling (see <see cref="UpsamplerState"/>)
  32. /// </summary>
  33. public UpsamplerManager UpsamplerManager;
  34. /// <summary>
  35. /// The memory to use for depop processing.
  36. /// </summary>
  37. /// <remarks>
  38. /// See <see cref="Dsp.Command.DepopForMixBuffersCommand"/> and <see cref="Dsp.Command.DepopPrepareCommand"/>
  39. /// </remarks>
  40. public Memory<float> DepopBuffer;
  41. }
  42. }