The GetCurrentPosition method retrieves the position of the play and write cursors in the sound buffer.
HRESULT GetCurrentPosition( LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor );
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:
Return code |
DSERR_INVALIDPARAM |
DSERR_PRIOLEVELNEEDED |
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.
Header: Declared in Dsound.h.
Import Library: Use Dsound3d.dll.