This method retrieves the current position of the play and write cursors in the sound buffer.
HRESULT GetCurrentPosition( LPDWORD lpdwCurrentPlayCursor, LPDWORD lpdwCurrentWriteCursor );
Address of a variable to contain the current play position in the DirectSoundBuffer object. This position is an offset within the sound buffer and is specified in bytes. This parameter can be NULL if the current play position is not wanted.
Address of a variable to contain the current write position in the DirectSoundBuffer object. This position is an offset within the sound buffer and is specified in bytes. This parameter can be NULL if the current write position is not wanted.
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:
The write cursor 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. For more information, see DirectSound in the Graphics and Multimedia guide.
It is always safe to change data that is behind the position indicated by the lpdwCurrentPlayCursor parameter.
OS Versions: Windows CE 2.12 and later. Version 2.12 requires DXPAK 1.0 or later.
Link Library: Dsound.lib.
IDirectSoundBuffer | IDirectSoundBuffer::SetCurrentPosition
Last updated on Thursday, April 08, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.