DSPUtil.WaveReader.Seek C# (CSharp) Method

Seek() private method

Seek to position in the data stream
private Seek ( long pos ) : void
pos long Sample position, 0-based
return void
        private void Seek(long pos)
        {
            if (_pos != pos)
            {
                if (!_rdr.BaseStream.CanSeek)
                {
                    string msg = String.Format("Cannot rewind this input stream (from {0} to {1}).", _pos, pos);
                    throw new NotSupportedException(msg);
                }
                _rdr.BaseStream.Seek(_seekpos + (pos * _nc * (_bitsPerSample / 8)), SeekOrigin.Begin);
                _pos = pos;
            }
        }