Export (0) Print
Expand All

IMFSimpleAudioVolume interface

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.

Members

The IMFSimpleAudioVolume interface inherits from the IUnknown interface. IMFSimpleAudioVolume also has these types of members:

Methods

The IMFSimpleAudioVolume interface has these methods.

MethodDescription
GetMasterVolume

Retrieves the master volume level.

GetMute

Queries whether the audio is muted.

SetMasterVolume

Sets the master volume level.

SetMute

Mutes or unmutes the audio.

 

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.

For example, if the master volume is 0.8 and the channel volume is 0.5, the attenuaton for that channel is 0.8 × 0.5 = 0.4. Volume levels can exceed 1.0 (positive gain), but the audio engine clips any audio samples that exceed zero decibels. To change the volume level of individual channels, use the IMFAudioStreamVolume interface.

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfidl.h

Library

Mfuuid.lib

See also

Media Foundation Interfaces
Streaming Audio Renderer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft