Using the Capture Buffer
Once you have created a CaptureBuffer object, you will need to control the process of reading and recording sound data. Capturing a sound consists of these steps.
- Start the buffer by calling CaptureBuffer.Start(true), which sets the capture buffer to a looping mode.
- Wait until the desired amount of data is available. For one method of determining when the capture cursor reaches a certain point, see Capture Buffer Notification. Alternatively, you can poll the read cursor by using CaptureBuffer.GetCurrentPosition.
- When sufficient data is available, read data from the buffer by calling CaptureBuffer.Read.
- Repeat steps 2 and 3 until you are ready to stop capturing data. Then call CaptureBuffer.Stop.