Microsoft SDK for Java

writeBuffer

This method of the DirectSoundBuffer Class writes the contents of a buffer to the given position in the sound buffer.

Syntax

public void writeBuffer(int start, int size, byte[] buffer, int flags);

Parameters

start Offset, in bytes, from the start of the buffer to the position to begin writing the data. This parameter is ignored if DSBLOCK_FROMWRITECURSOR is specified in the flags parameter.
size Size, in bytes, of the portion of the buffer to write to.
buffer Array variable that contain the data to write.
flags A value of DSBLOCK_ type specifying how the buffer should be locked before it is written to.

Remarks

This method automatically locks and unlocks the buffer before and after writing the data.

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