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.