Returns the HDMI and SPDIF channel counts currently being used by the audio driver.
public:
HRESULT GetHdAudioChannelCounts(
UINT *pHdmiChannelCount,
UINT *pSpdifChannelCount
)
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.
Type: HRESULT
A success or error code.
Refer to WASAPI error codes.
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:
Header: Declared in mmdeviceapi.h.
Library: Use MMDevApi.lib.