Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WMFP.SetVolume

Sets the audio volume.

Component Version macOS Windows Linux Server iOS SDK
WMFP 10.0 ❌ No ✅ Yes ❌ No ✅ Yes, on Windows ❌ No
MBS( "WMFP.SetVolume"; Player; Volume )   More

Parameters

Parameter Description Example
Player The reference number for the Windows Media Foundation Player object. $$Player
Volume The new volume value.

Result

Returns OK or error.

Description

Sets the audio volume.
Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation).
If you call this method before playback starts, the setting is applied after playback starts.

Examples

Set to volume to 50%:

Set Variable [$r; Value: MBS( "WMFP.SetVolume"; $$Player; 0.5 ) ]

See also

This function checks for a license.

Created 25th December 2019, last changed 17th July 2022


WMFP.SetVisible - WMFP.Stop