共用方式為


MediaPlayer.SetAudioStreamType(Stream) Method

Definition

Sets the audio stream type for this MediaPlayer.

[Android.Runtime.Register("setAudioStreamType", "(I)V", "GetSetAudioStreamType_IHandler")]
public virtual void SetAudioStreamType (Android.Media.Stream streamtype);
[<Android.Runtime.Register("setAudioStreamType", "(I)V", "GetSetAudioStreamType_IHandler")>]
abstract member SetAudioStreamType : Android.Media.Stream -> unit
override this.SetAudioStreamType : Android.Media.Stream -> unit

Parameters

streamtype
Stream

the audio stream type

Attributes

Remarks

Sets the audio stream type for this MediaPlayer. See AudioManager for a list of stream types. Must call this method before prepare() or prepareAsync() in order for the target stream type to become effective thereafter.

This member is deprecated. use #setAudioAttributes(AudioAttributes)

Java documentation for android.media.MediaPlayer.setAudioStreamType(int).

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.

Applies to

See also