A class that controls the volume.

Source: Internet
Author: User

 

 

When writing multimedia applications, you often need to use volume control, which provides you with a very convenient

Volume processing method.

 

 This class provides the following public interfaces. (In the file IVolume. h ).

 

 BoolIsAvailable ()-Says whether the volume controling is possible

 VoidEnable ()-Enables the line of the volume control

 VoidDisable ()-Disables the line of the volume control

 DWORDGetVolumeMetric ()-Retrieves the granularity of volume

 DWORDGetMinimalVolume ()-Retrieves the minimal volume that can be set

 DWORDGetMaximalVolume ()-Retrieves the maximal volume that can be set

 DWORDGetCurrentVolume ()-Retrieve the current volume

 VoidSetCurrentVolume (DWORD dwValue)-Set the volume

 

In addition, the last function allows you to register a user-defined callback function to handle notifications of volume changes.

VoidRegisterNotificationSink (PONMICVOULUMECHANGE, DWORD)

 

This interface usesVolumeOutMaster (VolumeOutMaster. h/cpp), CVolumeOutWave (VolumeOutWave. h/cpp)

AndCVolumeInXXX (VolumeInXXX. h/cpp) class.

 

These classes are very simple to use., There are detailed instructions for use in the source code compressed file, which will not be described here.

 

 

 

Related Article

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.