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

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

                for (int i = 0; i < 5; i++)
                {
                    double target = Randomiser.Range(-20, 20);
                    stateBefore.Fairlight.ProgramOut.Equalizer.Gain = target;
                    helper.SendAndWaitForChange(stateBefore, () => { equalizer.SetGain(target); });
                }
            });
        }
예제 #2
0
        public void TestEqualizerGain()
        {
            var  handler = CommandGenerator.CreateAutoCommandHandler <FairlightMixerSourceSetCommand, FairlightMixerSourceGetCommand>("EqualizerGain");
            bool tested  = false;

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

                    var target = Randomiser.Range(-20, 20);
                    srcState.Equalizer.Gain = target;
                    helper.SendAndWaitForChange(stateBefore, () => { eq.SetGain(target); });
                });
            });
            Assert.True(tested);
        }