public AudioDevice(VirtualDeviceSessionRegistry registry, KernelContext context, ulong appletResourceId, int revision) { _registry = registry; _appletResourceId = appletResourceId; _revision = revision; BehaviourContext behaviourContext = new BehaviourContext(); behaviourContext.SetUserRevision(revision); _isUsbDeviceSupported = behaviourContext.IsAudioUsbDeviceOutputSupported(); _sessions = _registry.GetSessionByAppletResourceId(appletResourceId); // TODO: support the 3 different events correctly when we will have hot plugable audio devices. _systemEvent = new KEvent(context); _systemEvent.ReadableEvent.Signal(); }