NVorbis.StreamReadBuffer.ReadByte C# (CSharp) Method

ReadByte() private method

private ReadByte ( long offset ) : int
offset long
return int
        internal int ReadByte(long offset)
        {
            if (offset < 0L) throw new ArgumentOutOfRangeException("offset");
            if (offset >= _wrapper.EofOffset) return -1;

            int count = 1;
            var startIdx = EnsureAvailable(offset, ref count, false);
            if (count == 1)
            {
                return _data[startIdx];
            }
            return -1;
        }

Usage Example

Exemplo n.º 1
0
        public override int ReadByte()
        {
            CheckLock();
            var val = _buffer.ReadByte(Position);

            if (val > -1)
            {
                Seek(1, SeekOrigin.Current);
            }
            return(val);
        }
All Usage Examples Of NVorbis.StreamReadBuffer::ReadByte