diff options
| author | Ac_K <Acoustik666@gmail.com> | 2018-02-16 03:19:29 +0100 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-02-15 23:19:29 -0300 |
| commit | b3e47b571241d8795d6f81c1ddcdc6268fc60f9e (patch) | |
| tree | 7db73996334b4c74c6b2cec116f2784c696c0d27 | |
| parent | 1bfe6a9c22c55086f171bd9c7cd7ff1855415ff8 (diff) | |
Update new informations in IAudioOut (#19)
* Update new informations in IAudioOut
* Update IAudioOut.cs
| -rw-r--r-- | Ryujinx/OsHle/Objects/Aud/IAudioOut.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Ryujinx/OsHle/Objects/Aud/IAudioOut.cs b/Ryujinx/OsHle/Objects/Aud/IAudioOut.cs index 5feb67d8..9e55e30e 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) { @@ -145,8 +145,9 @@ namespace Ryujinx.OsHle.Objects.Aud if (KeysQueue.Count > 0) TempKey = KeysQueue.Dequeue(); AMemoryHelper.WriteBytes(Context.Memory, Context.Request.ReceiveBuff[0].Position, BitConverter.GetBytes(TempKey)); - - Context.ResponseData.Write((int)TempKey); + + int ReleasedBuffersCount = 1; + Context.ResponseData.Write(ReleasedBuffersCount); if (OpenALInstalled) { |
