Microsoft DirectX 8.1 (Visual Basic)

DirectSoundCaptureBuffer8.GetCurrentPosition

The GetCurrentPosition method retrieves the capture and read cursors.

Syntax

object.GetCurrentPosition(cursors As DSCURSORS)

Parts

object

Resolves to a DirectSoundCaptureBuffer8 object.

cursors

DSCURSORS type that receives the position of the capture cursor and the read cursor. Each value is an offset from the start of the buffer, in bytes. See Remarks.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following error values.

DSERR_INVALIDPARAM
DSERR_NODRIVER
DSERR_OUTOFMEMORY

Remarks

The capture cursor, DSCURSORS.lPlay indicates the point to which data is being captured. The read cursor, DSCURSORS.lWrite, is behind the capture cursor and indicates the point up to which data can safely be read. The data after lWrite, up to and including lPlay, is not necessarily valid data, because of buffering.

See Also