IAudioController.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. using Ryujinx.Core.OsHle.Ipc;
  2. using System.Collections.Generic;
  3. namespace Ryujinx.Core.OsHle.Services.Am
  4. {
  5. class IAudioController : IpcService
  6. {
  7. private Dictionary<int, ServiceProcessRequest> m_Commands;
  8. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  9. public IAudioController()
  10. {
  11. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  12. {
  13. { 0, SetExpectedMasterVolume },
  14. { 1, GetMainAppletExpectedMasterVolume },
  15. { 2, GetLibraryAppletExpectedMasterVolume },
  16. { 3, ChangeMainAppletMasterVolume },
  17. { 4, SetTransparentVolumeRate }
  18. };
  19. }
  20. public long SetExpectedMasterVolume(ServiceCtx Context)
  21. {
  22. float AppletVolume = Context.RequestData.ReadSingle();
  23. float LibraryAppletVolume = Context.RequestData.ReadSingle();
  24. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  25. return 0;
  26. }
  27. public long GetMainAppletExpectedMasterVolume(ServiceCtx Context)
  28. {
  29. Context.ResponseData.Write(1f);
  30. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  31. return 0;
  32. }
  33. public long GetLibraryAppletExpectedMasterVolume(ServiceCtx Context)
  34. {
  35. Context.ResponseData.Write(1f);
  36. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  37. return 0;
  38. }
  39. public long ChangeMainAppletMasterVolume(ServiceCtx Context)
  40. {
  41. float Unknown0 = Context.RequestData.ReadSingle();
  42. long Unknown1 = Context.RequestData.ReadInt64();
  43. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  44. return 0;
  45. }
  46. public long SetTransparentVolumeRate(ServiceCtx Context)
  47. {
  48. float Unknown0 = Context.RequestData.ReadSingle();
  49. Logging.Stub(LogClass.ServiceAm, "Stubbed");
  50. return 0;
  51. }
  52. }
  53. }