From ad058403271dfab6659cce9b09e6f6a08c38f7f4 Mon Sep 17 00:00:00 2001 From: greggameplayer <33609333+greggameplayer@users.noreply.github.com> Date: Fri, 22 Jun 2018 04:34:04 +0200 Subject: [PATCH] Implement RequestUpdateAudioRendererAuto with a method --- .../OsHle/Services/Aud/IAudioRenderer.cs | 29 +++++++++++++------ 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Aud/IAudioRenderer.cs b/Ryujinx.HLE/OsHle/Services/Aud/IAudioRenderer.cs index 9c495db5a..61b5b7018 100644 --- a/Ryujinx.HLE/OsHle/Services/Aud/IAudioRenderer.cs +++ b/Ryujinx.HLE/OsHle/Services/Aud/IAudioRenderer.cs @@ -18,10 +18,11 @@ namespace Ryujinx.HLE.OsHle.Services.Aud { m_Commands = new Dictionary() { - { 4, RequestUpdateAudioRenderer }, - { 5, StartAudioRenderer }, - { 6, StopAudioRenderer }, - { 7, QuerySystemEvent } + { 4, RequestUpdateAudioRenderer }, + { 5, StartAudioRenderer }, + { 6, StopAudioRenderer }, + { 7, QuerySystemEvent }, + { 10, RequestUpdateAudioRendererAuto } }; UpdateEvent = new KEvent(); @@ -29,9 +30,21 @@ namespace Ryujinx.HLE.OsHle.Services.Aud public long RequestUpdateAudioRenderer(ServiceCtx Context) { - //(buffer) -> (buffer, buffer) + RequestUpdateAudioRendererMethod(Context, Context.Request.ReceiveBuff[0].Position); - long Position = Context.Request.ReceiveBuff[0].Position; + return 0; + } + + public long RequestUpdateAudioRendererAuto(ServiceCtx Context) + { + RequestUpdateAudioRendererMethod(Context, Context.Request.GetBufferType0x21().Position); + + return 0; + } + + public void RequestUpdateAudioRendererMethod(ServiceCtx Context, long Position) + { + //(buffer) -> (buffer, buffer) //0x40 bytes header Context.Memory.WriteInt32(Position + 0x4, 0xb0); //Behavior Out State Size? (note: this is the last section) @@ -49,8 +62,6 @@ namespace Ryujinx.HLE.OsHle.Services.Aud //TODO: We shouldn't be signaling this here. UpdateEvent.WaitEvent.Set(); - - return 0; } public long StartAudioRenderer(ServiceCtx Context) @@ -89,4 +100,4 @@ namespace Ryujinx.HLE.OsHle.Services.Aud } } } -} \ No newline at end of file +}