Преглед изворни кода

Fix a memory corruption in SoundIO wrapper (#742)

This fix audio slowdown on Unix based platforms where soundio will try
to switch to mono because of the invalid data written.
Thomas Guillemard пре 6 година
родитељ
комит
5c44c9600f
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      Ryujinx.Audio/Native/libsoundio/SoundIOOutStream.cs

+ 1 - 1
Ryujinx.Audio/Native/libsoundio/SoundIOOutStream.cs

@@ -64,7 +64,7 @@ namespace SoundIOSharp
 			get { unsafe { return new SoundIOChannelLayout ((IntPtr) ((void*) ((IntPtr) handle + layout_offset))); } }
 			set {
 				unsafe {
-					Buffer.MemoryCopy ((void*)((IntPtr)handle + layout_offset), (void*)value.Handle,
+					Buffer.MemoryCopy ((void*)value.Handle, (void*)((IntPtr)handle + layout_offset),
 							   Marshal.SizeOf<SoundIoChannelLayout> (), Marshal.SizeOf<SoundIoChannelLayout> ());
 				}
 			}