mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-08-02 21:17:09 +02:00
Refactor IPC services to have commands into separate classes, fix readme url
This commit is contained in:
parent
a4ff0d3484
commit
fba0bf8732
73 changed files with 825 additions and 583 deletions
51
Ryujinx.Core/OsHle/IpcServices/Aud/ServiceAudRen.cs
Normal file
51
Ryujinx.Core/OsHle/IpcServices/Aud/ServiceAudRen.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
using Ryujinx.Core.OsHle.Ipc;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using static Ryujinx.Core.OsHle.IpcServices.ObjHelper;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.IpcServices.Aud
|
||||
{
|
||||
class ServiceAudRen : IIpcService
|
||||
{
|
||||
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
||||
|
||||
public IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||
|
||||
public ServiceAudRen()
|
||||
{
|
||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||
{
|
||||
{ 0, OpenAudioRenderer },
|
||||
{ 1, GetAudioRendererWorkBufferSize },
|
||||
};
|
||||
}
|
||||
|
||||
public long OpenAudioRenderer(ServiceCtx Context)
|
||||
{
|
||||
MakeObject(Context, new IAudioRenderer());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public long GetAudioRendererWorkBufferSize(ServiceCtx Context)
|
||||
{
|
||||
int SampleRate = Context.RequestData.ReadInt32();
|
||||
int Unknown4 = Context.RequestData.ReadInt32();
|
||||
int Unknown8 = Context.RequestData.ReadInt32();
|
||||
int UnknownC = Context.RequestData.ReadInt32();
|
||||
int Unknown10 = Context.RequestData.ReadInt32();
|
||||
int Unknown14 = Context.RequestData.ReadInt32();
|
||||
int Unknown18 = Context.RequestData.ReadInt32();
|
||||
int Unknown1c = Context.RequestData.ReadInt32();
|
||||
int Unknown20 = Context.RequestData.ReadInt32();
|
||||
int Unknown24 = Context.RequestData.ReadInt32();
|
||||
int Unknown28 = Context.RequestData.ReadInt32();
|
||||
int Unknown2c = Context.RequestData.ReadInt32();
|
||||
int Rev1Magic = Context.RequestData.ReadInt32();
|
||||
|
||||
Context.ResponseData.Write(0x400L);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue