예제 #1
0
        public void TestPositiveDelay()
        {
            //Act
            var delayed = _signal.Delay(3);

            //Assert
            Assert.That(delayed.Samples, Is.EqualTo(new float[] { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }));
        }
예제 #2
0
        private void signalOperationButton_Click(object sender, EventArgs e)
        {
            if (_signal2 == null)
            {
                return;
            }

            var param = int.Parse(operationSamplesTextBox.Text);

            switch (operationComboBox.Text)
            {
            case "Delay by":
                _signal2 = _signal2.Delay(param);
                break;

            case "Repeat times":
                _signal2 = _signal2.Repeat(param);
                break;
            }

            _signal3 = _signal1 == null ? _signal2 : _signal1.Superimpose(_signal2);

            generatedSignalPanel.Signal    = _signal2;
            superimposedSignalPanel.Signal = _signal3;
        }