aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Guillemard <me@thog.eu>2019-08-19 22:28:14 +0200
committerGitHub <noreply@github.com>2019-08-19 22:28:14 +0200
commit5c44c9600f09c3faa45c01e2b94d01ac1715c71a (patch)
treee12e1ce187aa5d623d4801f71ced197679cfdb14
parent16aa2cfd621d6b9a6e4fcdc9323afc18891ea7d5 (diff)
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.
-rw-r--r--Ryujinx.Audio/Native/libsoundio/SoundIOOutStream.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Ryujinx.Audio/Native/libsoundio/SoundIOOutStream.cs b/Ryujinx.Audio/Native/libsoundio/SoundIOOutStream.cs
index a9101425..346e6afb 100644
--- a/Ryujinx.Audio/Native/libsoundio/SoundIOOutStream.cs
+++ b/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> ());
}
}