Waveform Capture: (5) "Capture buffer" information

Source: Internet
Author: User

You can use the Idirectsoundcapturebuffer8::getcaps method to get the size of the "capture buffer". Make sure that the dwsize member of the struct is initialized before using the DSCBCAPS structure as a parameter pass.

To get the format information when the buffer is created, you can call the Idirectsoundcapturebuffer8::getformat method. This method returns the format information in the form of a WAVEFORMATEX structure body.

Note: Your application can allow additional formatting information to exist WaveFormatEx the struct body when the GetFormat method is invoked for the first time using NULL as the Pwfxformat parameter. In this case, the DWORD pointed to by the Lpdwsizewritten parameter requires complete format information to receive the size of the structure.

To find out what an operation is currently being handled by a capture buffer, you can invoke the Idirectsoundcapturebuffer8::getstatus method. This method uses a combination of flags to populate a DWORD-type variable. These flags are used to indicate whether the buffer is currently busy capturing, if so, if so, if so, if so, if the loop, then the DSCBSTART_LOOPING flag is set when the Idirectsoundcapturebuffer8::start method is last called.

The Idirectsoundcapturebuffer8::getcurrentposition method returns the offset of the read pointer and the capture pointer within the buffer. The read pointer is at the end of the data that is currently fully captured to the buffer. The capture pointer is at the end of the data block that is currently being copied from the hardware. You can safely copy data from a buffer that is less than the offset of the read pointer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.