Platform SDK: DirectX

DirectSoundBuffer.GetCurrentPosition

The DirectSoundBuffer.GetCurrentPosition method retrieves the position of the play and write cursors in the sound buffer.

object.GetCurrentPosition(cursors As DSCURSORS)

Parameters

object
Object expression that resolves to a DirectSoundBuffer object.
cursors
DSCURSORS type that receives the current play position and the current write position in the buffer. This position is an offset within the sound 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 values.

DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

Remarks

The write cursor always leads the play cursor, typically by about 15 milliseconds of audio data. It is not safe to write data between the play position and the write position.

See Also

DirectSoundBuffer, DirectSoundBuffer.SetCurrentPosition