IAudioRendererManager.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using Ryujinx.Core.Logging;
  2. using Ryujinx.Core.OsHle.Ipc;
  3. using System.Collections.Generic;
  4. namespace Ryujinx.Core.OsHle.Services.Aud
  5. {
  6. class IAudioRendererManager : IpcService
  7. {
  8. private Dictionary<int, ServiceProcessRequest> m_Commands;
  9. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  10. public IAudioRendererManager()
  11. {
  12. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  13. {
  14. { 0, OpenAudioRenderer },
  15. { 1, GetAudioRendererWorkBufferSize },
  16. { 2, GetAudioDevice }
  17. };
  18. }
  19. public long OpenAudioRenderer(ServiceCtx Context)
  20. {
  21. MakeObject(Context, new IAudioRenderer());
  22. return 0;
  23. }
  24. public long GetAudioRendererWorkBufferSize(ServiceCtx Context)
  25. {
  26. int SampleRate = Context.RequestData.ReadInt32();
  27. int Unknown4 = Context.RequestData.ReadInt32();
  28. int Unknown8 = Context.RequestData.ReadInt32();
  29. int UnknownC = Context.RequestData.ReadInt32();
  30. int Unknown10 = Context.RequestData.ReadInt32();
  31. int Unknown14 = Context.RequestData.ReadInt32();
  32. int Unknown18 = Context.RequestData.ReadInt32();
  33. int Unknown1c = Context.RequestData.ReadInt32();
  34. int Unknown20 = Context.RequestData.ReadInt32();
  35. int Unknown24 = Context.RequestData.ReadInt32();
  36. int Unknown28 = Context.RequestData.ReadInt32();
  37. int Unknown2c = Context.RequestData.ReadInt32();
  38. int Rev1Magic = Context.RequestData.ReadInt32();
  39. Context.Ns.Log.PrintStub(LogClass.ServiceAudio, "Stubbed.");
  40. Context.ResponseData.Write(0x400L);
  41. return 0;
  42. }
  43. public long GetAudioDevice(ServiceCtx Context)
  44. {
  45. long UserId = Context.RequestData.ReadInt64();
  46. MakeObject(Context, new IAudioDevice());
  47. return 0;
  48. }
  49. }
  50. }