IAudioController.cs 2.1 KB

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