Microsoft DirectX 8.0 (C++)

IDirectSoundBuffer8::GetCurrentPosition

Retrieves the position of the play and write cursors in the sound buffer.

HRESULT GetCurrentPosition(
  LPDWORD pdwCurrentPlayCursor, 
  LPDWORD pdwCurrentWriteCursor 
);

Parameters

pdwCurrentPlayCursor
Address of a variable that receives the offset, in bytes, of the play cursor. This parameter can be NULL if the value is not wanted.
pdwCurrentWriteCursor
Address of a variable that receives the offset, in bytes, of the write cursor. This parameter can be NULL if the value is not wanted.

Return Values

If the method succeeds, the return value is DS_OK.

If the method fails, the return value may be one of the following error values:

DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

Remarks

The write cursor is the point in the buffer ahead of which it is safe to write data to the buffer. Data should not be written to the part of the buffer after the play cursor and before the write cursor. For more information, see Play and Write Cursors.

Requirements

  Header: Declared in dsound.h.

See Also

IDirectSoundBuffer8::SetCurrentPosition