mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-22 18:05:46 +00:00
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.
This commit is contained in:
parent
16aa2cfd62
commit
5c44c9600f
1 changed files with 1 additions and 1 deletions
|
@ -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> ());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue