This method of the DirectSoundBuffer Class retrieves the current position of the play and write cursors in the sound buffer.
public void getCurrentPosition(DSCursors cursors);
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. |
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.