mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-21 03:12:01 +00:00
0746b83edf
* Rename CommandAttribute as CommandHIpcAttribute to prepare for 12.x changes * Implement inital support for TIPC and adds SM command ids * *Ipc to *ipc * Missed a ref in last commit... * CommandAttributeTIpc to CommandAttributeTipc * Addresses comment and fixes some bugs around TIPC doesn't have any padding requirements as buffer C isn't a thing Fix for RegisterService inverting two argument only on TIPC
66 lines
No EOL
1.9 KiB
C#
66 lines
No EOL
1.9 KiB
C#
using Ryujinx.Common.Logging;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.SystemAppletProxy
|
|
{
|
|
class IAudioController : IpcService
|
|
{
|
|
public IAudioController() { }
|
|
|
|
[CommandHipc(0)]
|
|
// SetExpectedMasterVolume(f32, f32)
|
|
public ResultCode SetExpectedMasterVolume(ServiceCtx context)
|
|
{
|
|
float appletVolume = context.RequestData.ReadSingle();
|
|
float libraryAppletVolume = context.RequestData.ReadSingle();
|
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
|
|
[CommandHipc(1)]
|
|
// GetMainAppletExpectedMasterVolume() -> f32
|
|
public ResultCode GetMainAppletExpectedMasterVolume(ServiceCtx context)
|
|
{
|
|
context.ResponseData.Write(1f);
|
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
|
|
[CommandHipc(2)]
|
|
// GetLibraryAppletExpectedMasterVolume() -> f32
|
|
public ResultCode GetLibraryAppletExpectedMasterVolume(ServiceCtx context)
|
|
{
|
|
context.ResponseData.Write(1f);
|
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
|
|
[CommandHipc(3)]
|
|
// ChangeMainAppletMasterVolume(f32, u64)
|
|
public ResultCode ChangeMainAppletMasterVolume(ServiceCtx context)
|
|
{
|
|
float unknown0 = context.RequestData.ReadSingle();
|
|
long unknown1 = context.RequestData.ReadInt64();
|
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
|
|
[CommandHipc(4)]
|
|
// SetTransparentVolumeRate(f32)
|
|
public ResultCode SetTransparentVolumeRate(ServiceCtx context)
|
|
{
|
|
float unknown0 = context.RequestData.ReadSingle();
|
|
|
|
Logger.Stub?.PrintStub(LogClass.ServiceAm);
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
}
|
|
} |