Microsoft DirectX 8.1 (Visual Basic)

DirectSoundSecondaryBuffer8.SetCurrentPosition

The SetCurrentPosition method sets the position of the play cursor.

Syntax

object.SetCurrentPosition(newPosition As Long)

Parts

object

Resolves to a DirectSoundSecondaryBuffer8 object.

newPosition

Offset of the play cursor, in bytes, from the beginning of the buffer.

Error Codes

If the method fails, an error is raised and Err.Number may be set to one of the following error values

DSERR_INVALIDCALL
DSERR_INVALIDPARAM
DSERR_PRIOLEVELNEEDED

Remarks

If the buffer is playing, the cursor immediately moves to the new position and play continues from that point. If it is not playing, playback will begin from the new position the next time the DirectSoundSecondaryBuffer8.Play method is called.

See Also