DirectSoundCaptureBuffer.ReadBuffer
The DirectSoundCaptureBuffer.ReadBuffer method reads a segment of the sound capture buffer and stores the data into a variable of type Any.
object.ReadBuffer(start As Long, _
size As Long, _
buffer As Any, _
flags As CONST_DSCBLOCKFLAGS)
Parameters
- object
- Object expression that resolves to a DirectSoundCaptureBuffer object.
- start
- Offset, in bytes, from the start of the buffer to where the read begins.
- size
- Size, in bytes, of the portion of the buffer to read. Note that the sound buffer is conceptually circular. This parameter is ignored if DSCBLOCK_ENTIREBUFFER constant is set in the flags argument.
- buffer
- Variable to hold the data read. Must be the same size as the sound buffer. You must pass the first element of the array.
- flags
- Pass the following constant of the CONST_DSCBLOCKFLAGS enumeration to modify what is read:
- DSCBLOCK_ENTIREBUFFER
- Reads the entire buffer. The size parameter is ignored.
Error Codes
If the method fails, an error is raised and Err.Number may be set to one of the following error codes: