IAudioMeterInformation interface (endpointvolume.h)

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.

Inheritance

The IAudioMeterInformation interface inherits from the IUnknown interface. IAudioMeterInformation also has these types of members:

Methods

The IAudioMeterInformation interface has these methods.

 
IAudioMeterInformation::GetChannelsPeakValues

The GetChannelsPeakValues method gets the peak sample values for all the channels in the audio stream.
IAudioMeterInformation::GetMeteringChannelCount

The GetMeteringChannelCount method gets the number of channels in the audio stream that are monitored by peak meters.
IAudioMeterInformation::GetPeakValue

The GetPeakValue method gets the peak sample value for the channels in the audio stream.
IAudioMeterInformation::QueryHardwareSupport

The QueryHardwareSupport method queries the audio endpoint device for its hardware-supported functions. (IAudioMeterInformation.QueryHardwareSupport)

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header endpointvolume.h

See also

Core Audio Interfaces

EndpointVolume API

IMMDevice::Activate