IAudioEndpointVolumeEx::GetVolumeRangeChannel method

The GetVolumeRangeChannel method gets the volume range for a specified channel.

Syntax


HRESULT GetVolumeRangeChannel(
  [in]  UINT  iChannel,
  [out] float *pflVolumeMinDB,
  [out] float *pflVolumeMaxDB,
  [out] float *pflVolumeIncrementDB
);

Parameters

iChannel [in]

The channel number for which to get the volume range. If the audio stream has n channels, the channels are numbered from 0 to n– 1. To obtain the number of channels in the stream, call the IAudioEndpointVolume::GetChannelCount method.

pflVolumeMinDB [out]

Receives the minimum volume level for the channel, in decibels.

pflVolumeMaxDB [out]

Receives the maximum volume level for the channel, in decibels.

pflVolumeIncrementDB [out]

Receives the volume increment for the channel, in decibels.

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 pfLevelMinDB, pfLevelMaxDB, or pfVolumeIncrementDB is NULL.

 

Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

Windows Server 2008 R2 [desktop apps only]

Header

Endpointvolume.h

See also

IAudioEndpointVolumeEx

 

 

Show: