The IAudioStreamVolume interface enables a client to control and monitor the volume levels for all of the channels in an audio stream. The client obtains a reference to the IAudioStreamVolume interface on a stream object by calling the IAudioClient::GetService method with parameter riid set to REFIID IID_IAudioStreamVolume.
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.
Each of the four volume-level factors in the preceding list is a value in the range 0.0 to 1.0, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation). The effective volume level is also a value in the range 0.0 to 1.0.
When releasing an IAudioStreamVolume 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 IAudioStreamVolume interface controls the channel volumes in a shared-mode audio stream. This interface does not work with exclusive-mode streams. For information about volume controls for exclusive-mode streams, see EndpointVolume API.
The IAudioStreamVolume interface inherits from the IUnknown interface. IAudioStreamVolume also has these types of members:
The IAudioStreamVolume interface has these methods.
Retrieves the volume levels for all the channels in the audio stream.
Retrieves the number of channels contained in the audio stream.
Retrieves the volume level for the specified channel in the audio stream.
Sets the individual volume levels for all the channels in the audio stream.
Sets the volume level for the specified channel in the audio stream.
Minimum supported client
|Windows Vista [desktop apps only]|
Minimum supported server
|Windows Server 2008 [desktop apps only]|
Build date: 11/16/2013