Update IAudioDeviceService.cs

Stubs:
- QueryAudioDeviceSystemEvent
- GetActiveChannelCount
This commit is contained in:
Ac_K 2018-04-17 20:05:33 +02:00 committed by GitHub
parent 917fb7ad21
commit 958900968d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,4 +1,5 @@
using ChocolArm64.Memory;
using Ryujinx.Core.OsHle.Handles;
using Ryujinx.Core.OsHle.Ipc;
using System.Collections.Generic;
using System.Text;
@ -11,13 +12,19 @@ namespace Ryujinx.Core.OsHle.Services.Aud
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
private KEvent SystemEvent;
public IAudioDeviceService()
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
{ 0, ListAudioDeviceName },
{ 1, SetAudioDeviceOutputVolume },
{ 0, ListAudioDeviceName },
{ 1, SetAudioDeviceOutputVolume },
{ 4, QueryAudioDeviceSystemEvent },
{ 5, GetActiveChannelCount }
};
SystemEvent = new KEvent();
}
public long ListAudioDeviceName(ServiceCtx Context)
@ -45,6 +52,9 @@ namespace Ryujinx.Core.OsHle.Services.Aud
Position += Buffer.Length;
}
//TODO: We shouldn't be signaling this here.
SystemEvent.Handle.Set();
return 0;
}
@ -61,5 +71,25 @@ namespace Ryujinx.Core.OsHle.Services.Aud
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;
}
}
}
}