From eb88106b5c3496af91f3a9bb82f892aa1b393cea Mon Sep 17 00:00:00 2001 From: Ac_K Date: Fri, 16 Feb 2018 01:14:25 +0100 Subject: [PATCH] Update new informations in IAudioOut --- Ryujinx/OsHle/Objects/Aud/IAudioOut.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Ryujinx/OsHle/Objects/Aud/IAudioOut.cs b/Ryujinx/OsHle/Objects/Aud/IAudioOut.cs index 5feb67d89e..a36affe5cb 100644 --- a/Ryujinx/OsHle/Objects/Aud/IAudioOut.cs +++ b/Ryujinx/OsHle/Objects/Aud/IAudioOut.cs @@ -101,17 +101,17 @@ namespace Ryujinx.OsHle.Objects.Aud KeysQueue.Enqueue(BufferId); - byte[] AudioOutBuffer = AMemoryHelper.ReadBytes(Context.Memory, Context.Request.SendBuff[0].Position, 0x28); + byte[] AudioOutBuffer = AMemoryHelper.ReadBytes(Context.Memory, Context.Request.SendBuff[0].Position, sizeof(long) * 5); using (MemoryStream MS = new MemoryStream(AudioOutBuffer)) { BinaryReader Reader = new BinaryReader(MS); - long PointerToSampleDataPointer = Reader.ReadInt64(); - long PointerToSampleData = Reader.ReadInt64(); - long CapacitySampleBuffer = Reader.ReadInt64(); - long SizeDataSampleBuffer = Reader.ReadInt64(); - long Unknown = Reader.ReadInt64(); + long PointerNextBuffer = Reader.ReadInt64(); + long PointerSampleBuffer = Reader.ReadInt64(); + long CapacitySampleBuffer = Reader.ReadInt64(); + long SizeDataInSampleBuffer = Reader.ReadInt64(); + long OffsetDataInSampleBuffer = Reader.ReadInt64(); - byte[] AudioSampleBuffer = AMemoryHelper.ReadBytes(Context.Memory, PointerToSampleData, (int)SizeDataSampleBuffer); + byte[] AudioSampleBuffer = AMemoryHelper.ReadBytes(Context.Memory, PointerSampleBuffer + OffsetDataInSampleBuffer, (int)SizeDataInSampleBuffer); if (OpenALInstalled) { @@ -146,7 +146,7 @@ namespace Ryujinx.OsHle.Objects.Aud AMemoryHelper.WriteBytes(Context.Memory, Context.Request.ReceiveBuff[0].Position, BitConverter.GetBytes(TempKey)); - Context.ResponseData.Write((int)TempKey); + Context.ResponseData.Write(1); if (OpenALInstalled) {