Beispiel #1
0
        // QueryAudioDeviceSystemEvent() -> handle<copy, event>
        public ResultCode QueryAudioDeviceSystemEvent(ServiceCtx context)
        {
            KEvent deviceSystemEvent = _impl.QueryAudioDeviceSystemEvent();

            if (context.Process.HandleTable.GenerateHandle(deviceSystemEvent.ReadableEvent, out int handle) != KernelResult.Success)
            {
                throw new InvalidOperationException("Out of handles!");
            }

            context.Response.HandleDesc = IpcHandleDesc.MakeCopy(handle);

            Logger.Stub?.PrintStub(LogClass.ServiceAudio);

            return(ResultCode.Success);
        }