DirectX SDK |
The DirectSoundBuffer.GetCurrentPosition method retrieves the current position of the play and write cursors in the sound buffer.
object.GetCurrentPosition(cursors As DSCURSORS)
If the method fails, an error is raised and Err.Number may be set to one of the following values:
DSERR_INVALIDPARAM |
DSERR_PRIOLEVELNEEDED |
The lWrite member indicates the position at which it is safe to write new data to the buffer. The write cursor always leads the play cursor, typically by about 15 milliseconds' worth of audio data.
It is always safe to change data that is behind the position indicated by the lPlay member.