Explorar el Código

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 hace 6 años
padre
commit
5c44c9600f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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> ());
 				}
 			}