Android.Media.MediaPlayer.SetVolume Method
Sets the volume on this player.

Syntax

[Android.Runtime.Register("setVolume", "(FF)V", "GetSetVolume_FFHandler")]
public virtual void SetVolume (float leftVolume, float rightVolume)

Parameters

leftVolume
left volume scalar
rightVolume
right volume scalar

Remarks

Sets the volume on this player. This API is recommended for balancing the output of audio streams within an application. Unless you are writing an application to control user settings, this API should be used in preference to AudioManager.SetStreamVolume(Stream, System.Int32, System.Int32) which sets the volume of ALL streams of a particular type. Note that the passed volume values are raw scalars in range 0.0 to 1.0. UI controls should be scaled logarithmically.

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1