示例#1
0
        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();
        }
示例#2
0
        public void TestRevision3()
        {
            BehaviourContext behaviourContext = new BehaviourContext();

            behaviourContext.SetUserRevision(BehaviourContext.BaseRevisionMagic + BehaviourContext.Revision3);

            Assert.IsTrue(behaviourContext.IsAdpcmLoopContextBugFixed());
            Assert.IsTrue(behaviourContext.IsSplitterSupported());
            Assert.IsTrue(behaviourContext.IsLongSizePreDelaySupported());
            Assert.IsFalse(behaviourContext.IsAudioUsbDeviceOutputSupported());
            Assert.IsFalse(behaviourContext.IsFlushVoiceWaveBuffersSupported());
            Assert.IsFalse(behaviourContext.IsSplitterBugFixed());
            Assert.IsFalse(behaviourContext.IsElapsedFrameCountSupported());
            Assert.IsFalse(behaviourContext.IsDecodingBehaviourFlagSupported());
            Assert.IsFalse(behaviourContext.IsBiquadFilterEffectStateClearBugFixed());
            Assert.IsFalse(behaviourContext.IsMixInParameterDirtyOnlyUpdateSupported());
            Assert.IsFalse(behaviourContext.IsWaveBufferVersion2Supported());

            Assert.AreEqual(0.70f, behaviourContext.GetAudioRendererProcessingTimeLimit());
            Assert.AreEqual(1, behaviourContext.GetCommandProcessingTimeEstimatorVersion());
            Assert.AreEqual(1, behaviourContext.GetPerformanceMetricsDataFormat());
        }