mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-10-01 12:30:00 +02:00
Update IAudioDeviceService.cs (#87)
* Update IAudioDeviceService.cs Stubs: - QueryAudioDeviceSystemEvent - GetActiveChannelCount * Update IAudioDeviceService.cs * Update IAudioDeviceService.cs
This commit is contained in:
parent
ee6794e397
commit
7450b9d68a
1 changed files with 32 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
using ChocolArm64.Memory;
|
using ChocolArm64.Memory;
|
||||||
|
using Ryujinx.Core.OsHle.Handles;
|
||||||
using Ryujinx.Core.OsHle.Ipc;
|
using Ryujinx.Core.OsHle.Ipc;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
@ -11,13 +12,21 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
||||||
|
|
||||||
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
||||||
|
|
||||||
|
private KEvent SystemEvent;
|
||||||
|
|
||||||
public IAudioDeviceService()
|
public IAudioDeviceService()
|
||||||
{
|
{
|
||||||
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
||||||
{
|
{
|
||||||
{ 0, ListAudioDeviceName },
|
{ 0, ListAudioDeviceName },
|
||||||
{ 1, SetAudioDeviceOutputVolume },
|
{ 1, SetAudioDeviceOutputVolume },
|
||||||
|
{ 4, QueryAudioDeviceSystemEvent },
|
||||||
|
{ 5, GetActiveChannelCount }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
SystemEvent = new KEvent();
|
||||||
|
//TODO: We shouldn't be signaling this here.
|
||||||
|
SystemEvent.Handle.Set();
|
||||||
}
|
}
|
||||||
|
|
||||||
public long ListAudioDeviceName(ServiceCtx Context)
|
public long ListAudioDeviceName(ServiceCtx Context)
|
||||||
|
@ -61,5 +70,25 @@ namespace Ryujinx.Core.OsHle.Services.Aud
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long QueryAudioDeviceSystemEvent(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
int Handle = Context.Process.HandleTable.OpenHandle(SystemEvent);
|
||||||
|
|
||||||
|
Context.Response.HandleDesc = IpcHandleDesc.MakeCopy(Handle);
|
||||||
|
|
||||||
|
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long GetActiveChannelCount(ServiceCtx Context)
|
||||||
|
{
|
||||||
|
Context.ResponseData.Write(2);
|
||||||
|
|
||||||
|
Logging.Stub(LogClass.ServiceAudio, "Stubbed");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue