/// <summary>
        /// Adds an IInputDataStream to the end of the sequence.
        /// </summary>
        /// <param name="stream">Stream to add to the end of the sequence</param>
        public virtual void Add(IInputDataStream stream)
        {
            if (IsAddingCompleted)
                throw new InvalidOperationException("Stream marked as adding complete");

            if (stream.SampleRate != null && SampleRate != null && !Equals(stream.SampleRate, SampleRate))
                throw new ArgumentException("Sample rate mismatch");

            if (stream == this)
                throw new ArgumentException("Cannot add a sequence stream to itself");

            if (!stream.IsAtEnd)
            {
                Streams.Enqueue(stream);
            }
        }
 public override void Add(IInputDataStream stream)
 {
     lock (_syncLock) _stream.Add(stream);
 }
        public void SetUp()
        {
            stream1 = new NullInputDataStream(Option<TimeSpan>.Some(TimeSpan.FromSeconds(0.1)));
            stream2 = new NullInputDataStream(Option<TimeSpan>.Some(TimeSpan.FromSeconds(0.1)));

            seqStream = new SequenceInputDataStream();
            seqStream.Add(stream1);
            seqStream.Add(stream2);
        }