Ejemplo n.º 1
0
        /// <summary>
        /// Executes the block
        /// </summary>
        public override void Execute()
        {
            SetOperationDescription();
            var connectingNode = InputNodes[0].ConnectingNode as BlockOutputNode;

            if (connectingNode == null || connectingNode.Object == null)
            {
                return;
            }

            OutputNodes[0].Object.Clear();
            foreach (var signal in connectingNode.Object)
            {
                var output = signal.Copy();
                output.Samples = WaveMath.GetScalarOperationFunction(Operation)(signal.Samples, Value);
                OutputNodes[0].Object.Add(output);
            }
            if (Cascade && OutputNodes[0].ConnectingNode != null)
            {
                OutputNodes[0].ConnectingNode.Root.Execute();
            }
        }