public void TestResetPeakLevels()
        {
            bool tested   = false;
            var  expected = new AudioMixerResetPeaksCommand {
                Mask = AudioMixerResetPeaksCommand.MaskFlags.Input
            };
            var handler = CommandGenerator.MatchCommand(expected);

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.ClassicAudioMain, helper =>
            {
                IEnumerable <long> useIds = helper.Helper.BuildLibState().Audio.Inputs.Keys.ToList();
                foreach (long id in useIds)
                {
                    tested          = true;
                    uint timeBefore = helper.Server.CurrentTime;

                    expected.Input = (AudioSource)id;

                    IBMDSwitcherAudioInput input = GetInput(helper, id);
                    helper.SendAndWaitForChange(null, () => { input.ResetLevelNotificationPeaks(); });

                    // It should have sent a response, but we dont expect any comparable data
                    Assert.NotEqual(timeBefore, helper.Server.CurrentTime);
                }
            });
            Assert.True(tested);
        }
        public void TestResetPeakLevels()
        {
            var expected = new AudioMixerResetPeaksCommand {
                Mask = AudioMixerResetPeaksCommand.MaskFlags.Monitor
            };
            var handler = CommandGenerator.MatchCommand(expected, true);

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.ClassicAudioMonitors, helper =>
            {
                uint timeBefore = helper.Server.CurrentTime;

                IBMDSwitcherAudioMonitorOutput monitor = GetMonitor(helper);

                helper.SendAndWaitForChange(null, () => { monitor.ResetLevelNotificationPeaks(); });

                // It should have sent a response, but we dont expect any comparable data
                Assert.NotEqual(timeBefore, helper.Server.CurrentTime);
            });
        }
Example #3
0
        public void TestResetAllPeaks()
        {
            var expected = new AudioMixerResetPeaksCommand {
                Mask = AudioMixerResetPeaksCommand.MaskFlags.All
            };
            var handler = CommandGenerator.MatchCommand(expected, true);

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.ClassicAudioMain, helper =>
            {
                IBMDSwitcherAudioMixer mixer = GetAudioMixer(helper);
                AtemState stateBefore        = helper.Helper.BuildLibState();

                uint timeBefore = helper.Server.CurrentTime;

                helper.SendAndWaitForChange(stateBefore, () => { mixer.ResetAllLevelNotificationPeaks(); });

                // It should have sent a response, but we dont expect any comparable data
                Assert.NotEqual(timeBefore, helper.Server.CurrentTime);
            });
        }