IAudioController.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using Ryujinx.Common.Logging;
  2. namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
  3. {
  4. class IAudioController : IpcService
  5. {
  6. public IAudioController() { }
  7. [Command(0)]
  8. // SetExpectedMasterVolume(f32, f32)
  9. public ResultCode SetExpectedMasterVolume(ServiceCtx context)
  10. {
  11. float appletVolume = context.RequestData.ReadSingle();
  12. float libraryAppletVolume = context.RequestData.ReadSingle();
  13. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  14. return ResultCode.Success;
  15. }
  16. [Command(1)]
  17. // GetMainAppletExpectedMasterVolume() -> f32
  18. public ResultCode GetMainAppletExpectedMasterVolume(ServiceCtx context)
  19. {
  20. context.ResponseData.Write(1f);
  21. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  22. return ResultCode.Success;
  23. }
  24. [Command(2)]
  25. // GetLibraryAppletExpectedMasterVolume() -> f32
  26. public ResultCode GetLibraryAppletExpectedMasterVolume(ServiceCtx context)
  27. {
  28. context.ResponseData.Write(1f);
  29. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  30. return ResultCode.Success;
  31. }
  32. [Command(3)]
  33. // ChangeMainAppletMasterVolume(f32, u64)
  34. public ResultCode ChangeMainAppletMasterVolume(ServiceCtx context)
  35. {
  36. float unknown0 = context.RequestData.ReadSingle();
  37. long unknown1 = context.RequestData.ReadInt64();
  38. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  39. return ResultCode.Success;
  40. }
  41. [Command(4)]
  42. // SetTransparentVolumeRate(f32)
  43. public ResultCode SetTransparentVolumeRate(ServiceCtx context)
  44. {
  45. float unknown0 = context.RequestData.ReadSingle();
  46. Logger.Stub?.PrintStub(LogClass.ServiceAm);
  47. return ResultCode.Success;
  48. }
  49. }
  50. }