Microsoft SDK for Java

setCurrentPosition

This method of the DirectSoundBuffer Class moves the current play cursor for secondary sound buffers.

Syntax

public void setCurrentPosition(int newPosition);

Parameters

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

Remarks

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 play method is called.

See Also

getCurrentPosition, play

© 1999 Microsoft Corporation. All rights reserved. Terms of use.