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.

  1. Start the buffer by calling CaptureBuffer.Start(true), which sets the capture buffer to a looping mode.
  2. 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.
  3. When sufficient data is available, read data from the buffer by calling CaptureBuffer.Read.
  4. Repeat steps 2 and 3 until you are ready to stop capturing data. Then call CaptureBuffer.Stop.