Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
Capturing a sound consists of the following steps:
To make sure you are not attempting to lock a portion of memory that is about to be used for capture, you can first obtain the current read position by calling IDirectSoundCaptureBuffer::GetCurrentPosition. For an explanation of the read position, see Capture Buffer Information.
As parameters to the Lockmethod, you pass the size and offset of the block of memory you want to read. The method returns a pointer to the address where the memory block begins, and the size of the block. If the block wraps around from the end of the buffer to the beginning, two pointers are returned, one for each section of the block. The second pointer is NULL if the locked portion of the buffer does not wrap around.
Normally the buffer stops capturing automatically when the capture position reaches the end of the buffer. However, if the DSCBSTART_LOOPING flag was set in the dwFlagsparameter to the IDirectSoundCaptureBuffer::Startmethod, the capture will continue until the application calls the IDirectSoundCaptureBuffer::Stopmethod.
Last updated on Tuesday, May 18, 2004