Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IAudioMeterInformation::GetPeakValue method

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

Syntax


HRESULT GetPeakValue(
  [out] float *pfPeak
);

Parameters

pfPeak [out]

Pointer to a float variable into which the method writes the peak sample value for the audio stream. The peak value is a number in the normalized range from 0.0 to 1.0.

Return value

If the method succeeds, it returns S_OK. If it fails, possible return codes include, but are not limited to, the values shown in the following table.

Return codeDescription
E_POINTER

Parameter pfPeak is NULL.

 

Remarks

This method retrieves the peak sample value recorded across all of the channels in the stream. The peak value for each channel is recorded over one device period and made available during the subsequent device period. Thus, this method always retrieves the peak value recorded during the previous device period. To obtain the device period, call the IAudioClient::GetDevicePeriod method.

For a code example that uses the GetPeakValue method, see Peak Meters.

Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Endpointvolume.h

See also

IAudioClient::GetDevicePeriod
IAudioMeterInformation Interface

 

 

Show:
© 2017 Microsoft