IMMXboxDeviceEnumerator::GetHdAudioChannelCounts Method

Returns the HDMI and SPDIF channel counts currently being used by the audio driver.

Syntax

public:
HRESULT GetHdAudioChannelCounts(
         UINT *pHdmiChannelCount,
         UINT *pSpdifChannelCount
)  

Parameters

pHdmiChannelCount
Type: UINT *

[out] Pointer to an integer to contain the HDMI channel count.

pSpdifChannelCount
Type: UINT *

[out] Pointer to an integer to contain the SPDIF channel count.

Return value

Type: HRESULT 

A success or error code.

Refer to WASAPI error codes.

Remarks

If channel counts are zero for either device, then the user has selected Off for that output in the Settings app’s Display & sound page. Both devices cannot report a channel count of 0 at the same time; at least one must be active.

Register for a state change callback using RegisterChannelCountNotificationCallback.

For more information on volume metering, refer to the white paper:

Requirements

Header: Declared in mmdeviceapi.h.

Library: Use MMDevApi.lib.

See also

IMMXboxDeviceEnumerator

IMMXboxDeviceEnumerator Members