IMFSimpleAudioVolume interface (mfidl.h)
Controls the master volume level of the audio session associated with the streaming audio renderer (SAR) and the audio capture source.
The SAR and the audio capture source expose this interface as a service. To get a pointer to the interface, call IMFGetService::GetService. For the SAR, use the service identifier MR_POLICY_VOLUME_SERVICE. For the audio capture source, use the service identifier MR_CAPTURE_POLICY_VOLUME_SERVICE. You can call GetService directly on the SAR or the audio capture source, or call it on the Media Session.
Inheritance
The IMFSimpleAudioVolume interface inherits from the IUnknown interface. IMFSimpleAudioVolume also has these types of members:
Methods
The IMFSimpleAudioVolume interface has these methods.
IMFSimpleAudioVolume::GetMasterVolume Retrieves the master volume level. |
IMFSimpleAudioVolume::GetMute Queries whether the audio is muted. (IMFSimpleAudioVolume.GetMute) |
IMFSimpleAudioVolume::SetMasterVolume Sets the master volume level. |
IMFSimpleAudioVolume::SetMute Mutes or unmutes the audio. (IMFSimpleAudioVolume.SetMute) |
Remarks
To control the volume levels of individual channels, use the IMFAudioStreamVolume interface. The IMFAudioStreamVolume interface is supported by the SAR only.
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.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | mfidl.h |