hlStreamSeekEx() public static method

public static hlStreamSeekEx ( IntPtr pStream, long iOffset, HLSeekMode eSeekMode ) : ulong
pStream IntPtr
iOffset long
eSeekMode HLSeekMode
return ulong
Beispiel #1
0
        public override long Seek(long offset, SeekOrigin origin)
        {
            var seekMode = HLLib.HLSeekMode.HL_SEEK_BEGINNING;

            if (origin == SeekOrigin.Current)
            {
                seekMode  = HLLib.HLSeekMode.HL_SEEK_CURRENT;
                _position = _position + offset;
            }
            else if (origin == SeekOrigin.End)
            {
                seekMode  = HLLib.HLSeekMode.HL_SEEK_END;
                _position = _position - offset;
            }
            else
            {
                _position = offset;
            }

            return((long)HLLib.hlStreamSeekEx(_streamPtr, offset, seekMode));
        }