Migrate Audio service to new IPC (#6285)
* Migrate audren to new IPC * Migrate audout * Migrate audin * Migrate hwopus * Bye bye old audio service * Switch volume control to IHardwareDeviceDriver * Somewhat unrelated changes * Remove Concentus reference from HLE * Implement OpenAudioRendererForManualExecution * Remove SetVolume/GetVolume methods that are not necessary * Remove SetVolume/GetVolume methods that are not necessary (2) * Fix incorrect volume update * PR feedback * PR feedback * Stub audrec * Init outParameter * Make FinalOutputRecorderParameter/Internal readonly * Make FinalOutputRecorder IDisposable * Fix HardwareOpusDecoderManager parameter buffers * Opus work buffer size and error handling improvements * Add AudioInProtocolName enum * Fix potential divisions by zero
This commit is contained in:
parent
57d8afd0c9
commit
d4d0a48bfe
130 changed files with 3096 additions and 3174 deletions
|
@ -8,6 +8,7 @@ using Ryujinx.HLE.HOS.Kernel.Memory;
|
|||
using Ryujinx.HLE.HOS.Kernel.Process;
|
||||
using Ryujinx.HLE.HOS.Kernel.Threading;
|
||||
using Ryujinx.Horizon.Common;
|
||||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.Buffers;
|
||||
using System.Threading;
|
||||
|
@ -3142,6 +3143,37 @@ namespace Ryujinx.HLE.HOS.Kernel.SupervisorCall
|
|||
}
|
||||
#pragma warning restore CA1822
|
||||
|
||||
// Not actual syscalls, used by HLE services and such.
|
||||
|
||||
public IExternalEvent GetExternalEvent(int handle)
|
||||
{
|
||||
KWritableEvent writableEvent = KernelStatic.GetCurrentProcess().HandleTable.GetObject<KWritableEvent>(handle);
|
||||
|
||||
if (writableEvent == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new ExternalEvent(writableEvent);
|
||||
}
|
||||
|
||||
public IVirtualMemoryManager GetMemoryManagerByProcessHandle(int handle)
|
||||
{
|
||||
return KernelStatic.GetCurrentProcess().HandleTable.GetKProcess(handle).CpuMemory;
|
||||
}
|
||||
|
||||
public ulong GetTransferMemoryAddress(int handle)
|
||||
{
|
||||
KTransferMemory transferMemory = KernelStatic.GetCurrentProcess().HandleTable.GetObject<KTransferMemory>(handle);
|
||||
|
||||
if (transferMemory == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return transferMemory.Address;
|
||||
}
|
||||
|
||||
private static bool IsPointingInsideKernel(ulong address)
|
||||
{
|
||||
return (address + 0x1000000000) < 0xffffff000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue