2018-10-17 13:15:50 -04:00
|
|
|
using Ryujinx.Common.Logging;
|
2018-02-09 19:14:55 -05:00
|
|
|
|
2019-09-18 20:45:11 -04:00
|
|
|
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
|
2018-02-09 19:14:55 -05:00
|
|
|
{
|
2018-03-19 14:58:46 -04:00
|
|
|
class IAudioController : IpcService
|
2018-02-09 19:14:55 -05:00
|
|
|
{
|
2019-07-11 21:13:43 -04:00
|
|
|
public IAudioController() { }
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(0)]
|
2019-07-11 21:13:43 -04:00
|
|
|
// SetExpectedMasterVolume(f32, f32)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode SetExpectedMasterVolume(ServiceCtx context)
|
2018-04-17 21:39:27 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
float appletVolume = context.RequestData.ReadSingle();
|
|
|
|
float libraryAppletVolume = context.RequestData.ReadSingle();
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-04-17 21:39:27 -04:00
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(1)]
|
2019-07-11 21:13:43 -04:00
|
|
|
// GetMainAppletExpectedMasterVolume() -> f32
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode GetMainAppletExpectedMasterVolume(ServiceCtx context)
|
2018-04-17 21:39:27 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
context.ResponseData.Write(1f);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-04-17 21:39:27 -04:00
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(2)]
|
2019-07-11 21:13:43 -04:00
|
|
|
// GetLibraryAppletExpectedMasterVolume() -> f32
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode GetLibraryAppletExpectedMasterVolume(ServiceCtx context)
|
2018-04-17 21:39:27 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
context.ResponseData.Write(1f);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-04-17 21:39:27 -04:00
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(3)]
|
2019-07-11 21:13:43 -04:00
|
|
|
// ChangeMainAppletMasterVolume(f32, u64)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode ChangeMainAppletMasterVolume(ServiceCtx context)
|
2018-04-17 21:39:27 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
float unknown0 = context.RequestData.ReadSingle();
|
|
|
|
long unknown1 = context.RequestData.ReadInt64();
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-04-17 21:39:27 -04:00
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(4)]
|
2019-07-11 21:13:43 -04:00
|
|
|
// SetTransparentVolumeRate(f32)
|
2019-07-14 15:04:38 -04:00
|
|
|
public ResultCode SetTransparentVolumeRate(ServiceCtx context)
|
2018-04-17 21:39:27 -04:00
|
|
|
{
|
2018-12-06 06:16:24 -05:00
|
|
|
float unknown0 = context.RequestData.ReadSingle();
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2020-08-03 19:32:53 -04:00
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
2018-04-17 21:39:27 -04:00
|
|
|
|
2019-07-14 15:04:38 -04:00
|
|
|
return ResultCode.Success;
|
2018-04-17 21:39:27 -04:00
|
|
|
}
|
2018-02-09 19:14:55 -05:00
|
|
|
}
|
2019-07-11 21:13:43 -04:00
|
|
|
}
|