Android.Media.MediaPlayer.SetAudioAttributes Method
Sets the audio attributes for this MediaPlayer.

Syntax

[Android.Runtime.Register("setAudioAttributes", "(Landroid/media/AudioAttributes;)V", "GetSetAudioAttributes_Landroid_media_AudioAttributes_Handler")]
public virtual void SetAudioAttributes (AudioAttributes attributes)

Parameters

attributes
a non-null set of audio attributes

Exceptions

TypeReason
Java.Lang.IllegalArgumentException

Remarks

Sets the audio attributes for this MediaPlayer. See Android.Media.AudioAttributes for how to build and configure an instance of this class. You must call this method before MediaPlayer.Prepare or MediaPlayer.PrepareAsync in order for the audio attributes to become effective thereafter.

[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