/// <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); }
/// <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; }
/// <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)); }
/// <summary> /// Constructor. Configures output pipe. /// </summary> /// <param name="pOutput">Output pipe.</param> protected FifoProcessor(FifoSamplePipe <TSampletype> pOutput) { Debug.Assert(pOutput != null); Output = pOutput; }
/// <summary> /// Constructor. Doesn't define output pipe; it has to be set be /// <see cref="SetOutPipe"/> function. /// </summary> protected FifoProcessor() { Output = null; }
/// <summary> /// Sets output pipe. /// </summary> protected void SetOutPipe(FifoSamplePipe <TSampletype> pOutput) { Debug.Assert(Output == null); Debug.Assert(pOutput != null); Output = pOutput; }