This method of the DirectSoundBuffer Class writes the contents of a buffer to the given position in the sound buffer.
public void writeBuffer(int start, int size, byte[] buffer, int flags);
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. |
This method automatically locks and unlocks the buffer before and after writing the data.