IDirectSoundBuffer::SetCurrentPosition

HRESULT SetCurrentPosition(DWORD dwNewPosition);

Moves the current play cursor for secondary sound buffers.

·Returns DS_OK if successful, or one of the following error values otherwise:

DSERR_INVALIDCALL DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED  

dwNewPosition

New position, in bytes, from the beginning of the buffer that will be used when the sound buffer is played.

This method cannot be called on primary sound buffers.

If the buffer is playing, it will immediately move to the new position and continue. If it is not playing, it will begin from the new position the next time the IDirectSoundBuffer::Play method is called.