NVorbis.StreamReadBuffer.DiscardThrough C# (CSharp) Method

DiscardThrough() public method

Tells the buffer that it no longer needs to maintain any bytes before the indicated offset.
public DiscardThrough ( long offset ) : void
offset long The offset to discard through.
return void
        public void DiscardThrough(long offset)
        {
            var count = (int)(offset - _baseOffset);
            _discardCount = Math.Max(count, _discardCount);

            if (_discardCount >= _data.Length) CommitDiscard();
        }

Usage Example

Beispiel #1
0
 public void Discard(int bytes)
 {
     lock (_localLock)
     {
         _buffer.DiscardThrough(_buffer.BaseOffset + bytes);
     }
 }
All Usage Examples Of NVorbis.StreamReadBuffer::DiscardThrough