DirectX SDK

DirectSoundCaptureBuffer.GetCurrentPosition

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

The capture position is ahead of the read position. These positions are not always identical due to possible buffering of captured data either on the physical device or in the host. The data after the read position up to and including the capture position is not necessarily valid data.

object.GetCurrentPosition(cursors As DSCURSORS)

Parameters

object
Object expression that resolves to a DirectSoundCaptureBuffer object.
cursors
A DSCURSORS type that contains the current capture position and the current position (the lPlay and the lWrite members) in the DirectSoundCaptureBuffer object. This position is an offset within 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