Controls the volume levels of individual audio channels.
The streaming audio renderer (SAR) exposes this interface as a service. To get a pointer to the interface, call IMFGetService::GetService with the service identifier MR_STREAM_VOLUME_SERVICE. You can call GetService directly on the SAR or call it on the Media Session.
The IMFAudioStreamVolume interface inherits from the IUnknown interface. IMFAudioStreamVolume also has these types of members:
The IMFAudioStreamVolume interface has these methods.
|IMFAudioStreamVolume::GetAllVolumes||Retrieves the volume levels for all of the channels in the audio stream.|
|IMFAudioStreamVolume::GetChannelCount||Retrieves the number of channels in the audio stream.|
|IMFAudioStreamVolume::GetChannelVolume||Retrieves the volume level for a specified channel in the audio stream.|
|IMFAudioStreamVolume::SetAllVolumes||Sets the individual volume levels for all of the channels in the audio stream.|
|IMFAudioStreamVolume::SetChannelVolume||Sets the volume level for a specified channel in the audio stream.|
If your application does not require channel-level volume control, you can use the IMFSimpleAudioVolume interface to control the master volume level of the audio session.
Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation). For each channel, the attenuation level is the product of:
- The master volume level of the audio session.
- The volume level of the channel.
Use the following formula to convert the volume level to the decibel (dB) scale:
Attenuation (dB) = 20 * log10(Level)
For example, a volume level of 0.50 represents 6.02 dB of attenuation.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2008 [desktop apps only]|