Platform SDK: DirectX

DirectSoundCaptureBuffer.GetCurrentPosition

The DirectSoundCaptureBuffer.GetCurrentPosition method retrieves the current capture and read positions in the buffer.

object.GetCurrentPosition(cursors As DSCURSORS)

Parameters

object
Object expression that resolves to a DirectSoundCaptureBuffer object.
cursors
DSCURSORS type that receives the current capture position (lPlay) and the current read position (lWrite). Each position is an offset in the capture buffer and is specified in bytes.

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 position is ahead of the read position and indicates the point to which data is being captured. The read position (DSCURSORS.lWrite) is the point up to which data can safely be read. The data after the read position, up to and including the capture position, is not necessarily valid data, because of buffering.