Microsoft SDK for Java

getCurrentPosition

This method of the DirectSoundBuffer Class retrieves the current position of the play and write cursors in the sound buffer.

Syntax

public void getCurrentPosition(DSCursors cursors);

Parameters

cursors A DSCursors object that receives the current play and write positions in the DirectSoundBuffer object. These positions are offsets within the sound buffer and are specified in bytes.

Remarks

The write cursor indicates the position at which it is safe to write new data into the buffer. The write cursor always leads the play cursor, typically by about 15 milliseconds worth of audio data.

It is always safe to change data that is behind the play position.

See Also

setCurrentPosition

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