The IAudioMeterInformation interface represents a peak meter on an audio stream to or from an audio endpoint device. The client obtains a reference to the IAudioMeterInformation interface on an endpoint object by calling the IMMDevice::Activate method with parameter iid set to REFIID IID_IAudioMeterInformation.
If the adapter device that streams audio data to or from the endpoint device implements a hardware peak meter, the IAudioMeterInformation interface uses that meter to monitor the peak levels in the audio stream. If the audio device lacks a hardware peak meter, the audio engine automatically implements the peak meter in software, transparently to the client.
If a device has a hardware peak meter, a client can use the methods in the IAudioMeterInformation interface to monitor the device's peak levels in both shared mode and exclusive mode. If a device lacks a hardware peak meter, a client can use those methods to monitor the device's peak levels in shared mode, but not in exclusive mode. In exclusive mode, the client and the device exchange audio data directly, bypassing the software peak meter. In exclusive mode, a software peak meter always reports a peak value of 0.0.
To determine whether a device has a hardware peak meter, call the IAudioMeterInformation::QueryHardwareSupport method.
For a rendering endpoint device, the IAudioMeterInformation interface monitors the peak levels in the output stream before the stream is attenuated by the endpoint volume controls. Similarly, for a capture endpoint device, the interface monitors the peak levels in the input stream before the stream is attenuated by the endpoint volume controls.
The peak values reported by the methods in the IAudioMeterInformation interface are normalized to the range from 0.0 to 1.0. For example, if a PCM stream contains 16-bit samples, and the peak sample value during a particular metering period is –8914, then the absolute value recorded by the peak meter is 8914, and the normalized peak value reported by the IAudioMeterInformation interface is 8914/32768 = 0.272.
For a code example that uses the IAudioMeterInformation interface, see Peak Meters.
The IAudioMeterInformation interface inherits from the IUnknown interface. IAudioMeterInformation also has these types of members:
The IAudioMeterInformation interface has these methods.
Gets the peak sample values for all the channels in the audio stream.
Gets the number of channels in the audio stream that are monitored by peak meters.
Gets the peak sample value for the channels in the audio stream.
Queries the audio endpoint device for its hardware-supported functions.
Minimum supported client
|Windows Vista [desktop apps | Windows Store apps]|
Minimum supported server
|Windows Server 2008 [desktop apps | Windows Store apps]|