(2nd week) mixer API usage Summary

Source: Internet
Author: User

Hardware Audio Mixer functions is an API function provided by Microsoft.

Open the Control item-sound in the control panel to set the input and output sounds of the system. For example, in audio ouput, you can view the Left and Right audio channels of the main volume, the volume, and whether the audio is muted and set. You can also set the CD volume and waveform respectively. The mixer API allows us to implement these functions by programming, and when these values are modified in the control panel (of course, other mixer APIs can also be called.Program). We can also receive related notifications.

 

The best document for learning mixer APIS is msdn. This is a Chinese mixerapi document I downloaded online. The download link is as follows:

Http://download.csdn.net/detail/q191201771/4506117

However, I think the content it says is not necessarily completely correct or is not necessarily the most suitable for understanding. Therefore, you have to do it yourself to really master the mixerapi.

The purpose of using the mixerapi is to disable all input sources except microphone in the program.

At first, I used to obtain the target line mixerline_componenttype_dst_wavein and then obtain its control mixercontrol_controltype_mixer. In this control, only microphone is enabled, and all others are disabled.

Tests in different environments show that some machines do not have the mixerline_componenttype_dst_wavein control in the target line mixerline_componenttype_dst_wavein. DescriptionIn different environments(This problem may be caused by the sound card type or the operating system version. Due to the number of testing machines and development time constraints, the problem cannot be fully clarified ),The lines and controls that can be obtained are different..

In different environments, the sound in the control panel can be set with different items, which seems to prove this.

 

Later, we acquired all the source lines of the target line mixerline_componenttype_dst_wavein and used the mute control in the source line to mute all the source lines except mic. This method is successful on several local test machines.

 

For more information, see www.cnblogs.com/chef.

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.