示例#1
0
        /// <summary>
        /// Moves samples from the <paramref name="other"/> pipe instance to
        /// this instance.
        /// </summary>
        /// <param name="other">Other pipe instance where from the receive the
        /// data.</param>
        public void MoveSamples(FifoSamplePipe <TSampletype> other)
        {
            var oNumSamples = other.AvailableSamples;

            PutSamples(other.PtrBegin(), oNumSamples);
            other.ReceiveSamples(oNumSamples);
        }
示例#2
0
        /// <summary>
        /// Sets the output pipe.
        /// </summary>
        /// <exception cref="InvalidOperationException">The output pipe is already set.</exception>
        protected void SetOutPipe(FifoSamplePipe output)
        {
            if (output is null)
            {
                throw new ArgumentNullException(nameof(output));
            }

            if (Output != null)
            {
                throw new InvalidOperationException(Strings.InvalidOperation_OutputPipeOverwrite);
            }

            Output = output;
        }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FifoProcessor"/> class.
 /// </summary>
 /// <param name="output">The pipe where processed samples are put.</param>
 protected FifoProcessor(FifoSamplePipe output)
 {
     Output = output ?? throw new ArgumentNullException(nameof(output));
 }
示例#4
0
 /// <summary>
 /// Constructor. Configures output pipe.
 /// </summary>
 /// <param name="pOutput">Output pipe.</param>
 protected FifoProcessor(FifoSamplePipe <TSampletype> pOutput)
 {
     Debug.Assert(pOutput != null);
     Output = pOutput;
 }
示例#5
0
 /// <summary>
 /// Constructor. Doesn't define output pipe; it has to be set be
 /// <see cref="SetOutPipe"/> function.
 /// </summary>
 protected FifoProcessor()
 {
     Output = null;
 }
示例#6
0
 /// <summary>
 /// Sets output pipe.
 /// </summary>
 protected void SetOutPipe(FifoSamplePipe <TSampletype> pOutput)
 {
     Debug.Assert(Output == null);
     Debug.Assert(pOutput != null);
     Output = pOutput;
 }