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

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                TestFairlightInputSource.EachRandomSource(helper, (stateBefore, srcState, inputId, src, i) =>
                {
                    IBMDSwitcherFairlightAudioCompressor compressor = GetCompressor(src);
                    srcState.Dynamics.Compressor.CompressorEnabled  = i % 2 > 0;
                    helper.SendAndWaitForChange(stateBefore, () => { compressor.SetEnabled(i % 2); });
                });
            });
        }
Example #2
0
        public void TestCompressorEnabled()
        {
            var handler =
                CommandGenerator
                .CreateAutoCommandHandler <FairlightMixerMasterCompressorSetCommand,
                                           FairlightMixerMasterCompressorGetCommand>("CompressorEnabled");

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

                AtemState stateBefore = helper.Helper.BuildLibState();

                for (int i = 0; i < 5; i++)
                {
                    stateBefore.Fairlight.ProgramOut.Dynamics.Compressor.CompressorEnabled = i % 2 > 0;
                    helper.SendAndWaitForChange(stateBefore, () => { compressor.SetEnabled(i % 2); });
                }
            });
        }