mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-05 02:22:02 +00:00
Close audio WorkBuffer transfer memory handle (#1770)
This commit is contained in:
parent
f7617cae12
commit
1b053d2222
1 changed files with 3 additions and 1 deletions
|
@ -30,7 +30,8 @@ namespace Ryujinx.HLE.HOS.Services.Audio
|
||||||
ulong workBufferSize = context.RequestData.ReadUInt64();
|
ulong workBufferSize = context.RequestData.ReadUInt64();
|
||||||
ulong appletResourceUserId = context.RequestData.ReadUInt64();
|
ulong appletResourceUserId = context.RequestData.ReadUInt64();
|
||||||
|
|
||||||
KTransferMemory workBufferTransferMemory = context.Process.HandleTable.GetObject<KTransferMemory>(context.Request.HandleDesc.ToCopy[0]);
|
int transferMemoryHandle = context.Request.HandleDesc.ToCopy[0];
|
||||||
|
KTransferMemory workBufferTransferMemory = context.Process.HandleTable.GetObject<KTransferMemory>(transferMemoryHandle);
|
||||||
uint processHandle = (uint)context.Request.HandleDesc.ToCopy[1];
|
uint processHandle = (uint)context.Request.HandleDesc.ToCopy[1];
|
||||||
|
|
||||||
ResultCode result = _impl.OpenAudioRenderer(context, out IAudioRenderer renderer, ref parameter, workBufferSize, appletResourceUserId, workBufferTransferMemory, processHandle);
|
ResultCode result = _impl.OpenAudioRenderer(context, out IAudioRenderer renderer, ref parameter, workBufferSize, appletResourceUserId, workBufferTransferMemory, processHandle);
|
||||||
|
@ -40,6 +41,7 @@ namespace Ryujinx.HLE.HOS.Services.Audio
|
||||||
MakeObject(context, new AudioRendererServer(renderer));
|
MakeObject(context, new AudioRendererServer(renderer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
context.Device.System.KernelContext.Syscall.CloseHandle(transferMemoryHandle);
|
||||||
context.Device.System.KernelContext.Syscall.CloseHandle((int)processHandle);
|
context.Device.System.KernelContext.Syscall.CloseHandle((int)processHandle);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in a new issue