IChannelAudioVolume interface (audioclient.h)
The IChannelAudioVolume interface enables a client to control and monitor the volume levels for all of the channels in the audio session that the stream belongs to. This is the session that the client assigned the stream to during the call to the IAudioClient::Initialize method. The client obtains a reference to the IChannelAudioVolume interface on a stream object by calling the IAudioClient::GetService method with parameter riid set to REFIID IID_IChannelAudioVolume.
The effective volume level of any channel in the session submix, as heard at the speakers, is the product of the following four volume-level factors:
- The per-channel volume levels of the streams in the session, which clients can control through the methods in the IAudioStreamVolume interface.
- The per-channel volume level of the session, which clients can control through the methods in the IChannelAudioVolume interface.
- The master volume level of the session, which clients can control through the methods in the ISimpleAudioVolume interface.
- The policy-based volume level of the session, which the system dynamically assigns to the session as the global mix changes.
Typical audio applications do not modify the volume levels of sessions. Instead, they rely on users to set these volume levels through the Sndvol program. Sndvol modifies only the master volume levels of sessions. By default, the session manager sets the per-channel volume levels to 1.0 at the initial activation of a session. Subsequent per-channel volume changes by clients are persistent across computer restarts.
When releasing an IChannelAudioVolume interface instance, the client must call the interface's Release method from the same thread as the call to IAudioClient::GetService that created the object.
The IChannelAudioVolume interface controls the channel volumes in an audio session. An audio session is a collection of shared-mode streams. This interface does not work with exclusive-mode streams. For information about volume controls for exclusive-mode streams, see EndpointVolume API.
The IChannelAudioVolume interface inherits from the IUnknown interface. IChannelAudioVolume also has these types of members:
The IChannelAudioVolume interface has these methods.
|IChannelAudioVolume::GetAllVolumes||The GetAllVolumes method retrieves the volume levels for all the channels in the audio session.|
|IChannelAudioVolume::GetChannelCount||The GetChannelCount method retrieves the number of channels in the stream format for the audio session.|
|IChannelAudioVolume::GetChannelVolume||The GetChannelVolume method retrieves the volume level for the specified channel in the audio session.|
|IChannelAudioVolume::SetAllVolumes||The SetAllVolumes method sets the individual volume levels for all the channels in the audio session.|
|IChannelAudioVolume::SetChannelVolume||The SetChannelVolume method sets the volume level for the specified channel in the audio session.|
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|