MediaPlayer.SetAudioAttributes(AudioAttributes) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the audio attributes for this MediaPlayer.
[Android.Runtime.Register("setAudioAttributes", "(Landroid/media/AudioAttributes;)V", "GetSetAudioAttributes_Landroid_media_AudioAttributes_Handler")]
public virtual void SetAudioAttributes (Android.Media.AudioAttributes? attributes);
[<Android.Runtime.Register("setAudioAttributes", "(Landroid/media/AudioAttributes;)V", "GetSetAudioAttributes_Landroid_media_AudioAttributes_Handler")>]
abstract member SetAudioAttributes : Android.Media.AudioAttributes -> unit
override this.SetAudioAttributes : Android.Media.AudioAttributes -> unit
Parameters
- attributes
- AudioAttributes
a non-null set of audio attributes
- Attributes
Exceptions
Remarks
Sets the audio attributes for this MediaPlayer. See AudioAttributes
for how to build and configure an instance of this class. You must call this method before #prepare()
or #prepareAsync()
in order for the audio attributes to become effective thereafter.
Java documentation for android.media.MediaPlayer.setAudioAttributes(android.media.AudioAttributes)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.