Example #1
0
        public void TestHold()
        {
            var handler =
                CommandGenerator
                .CreateAutoCommandHandler <FairlightMixerSourceCompressorSetCommand,
                                           FairlightMixerSourceCompressorGetCommand>("Hold");

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                TestFairlightInputSource.EachRandomSource(helper, (stateBefore, srcState, inputId, src, i) =>
                {
                    IBMDSwitcherFairlightAudioCompressor compressor = GetCompressor(src);

                    var target = Randomiser.Range(0, 4000);
                    srcState.Dynamics.Compressor.Hold = target;
                    helper.SendAndWaitForChange(stateBefore, () => { compressor.SetHold(target); });
                });
            });
        }
Example #2
0
        public void TestHold()
        {
            var handler =
                CommandGenerator
                .CreateAutoCommandHandler <FairlightMixerMasterCompressorSetCommand,
                                           FairlightMixerMasterCompressorGetCommand>("Hold");

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                IBMDSwitcherFairlightAudioCompressor compressor = GetCompressor(helper);

                AtemState stateBefore = helper.Helper.BuildLibState();

                for (int i = 0; i < 5; i++)
                {
                    var target = Randomiser.Range(0, 4000);
                    stateBefore.Fairlight.ProgramOut.Dynamics.Compressor.Hold = target;
                    helper.SendAndWaitForChange(stateBefore, () => { compressor.SetHold(target); });
                }
            });
        }