public void TestEnabled()
        {
            var handler = CommandGenerator.CreateAutoCommandHandler <FairlightMixerMasterSetCommand, FairlightMixerMasterGetCommand>("EqualizerEnabled");

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                IBMDSwitcherFairlightAudioEqualizer equalizer = GetEqualizer(helper);
                AtemState stateBefore = helper.Helper.BuildLibState();

                for (int i = 0; i < 5; i++)
                {
                    stateBefore.Fairlight.ProgramOut.Equalizer.Enabled = i % 2 > 0;
                    helper.SendAndWaitForChange(stateBefore, () => { equalizer.SetEnabled(i % 2); });
                }
            });
        }
Esempio n. 2
0
        public void TestEqualizerEnabled()
        {
            var  handler = CommandGenerator.CreateAutoCommandHandler <FairlightMixerSourceSetCommand, FairlightMixerSourceGetCommand>("EqualizerEnabled");
            bool tested  = false;

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                EachRandomSource(helper, (stateBefore, srcState, inputId, src, i) =>
                {
                    IBMDSwitcherFairlightAudioEqualizer eq = GetEqualizer(src);
                    tested = true;

                    srcState.Equalizer.Enabled = i % 2 == 1;
                    helper.SendAndWaitForChange(stateBefore, () => { eq.SetEnabled(i % 2); });
                });
            });
            Assert.True(tested);
        }