共用方式為


AudioTrack.PlaybackParams Property

Definition

Returns the current playback parameters. -or- Sets the playback parameters.

public virtual Android.Media.PlaybackParams PlaybackParams { [Android.Runtime.Register("getPlaybackParams", "()Landroid/media/PlaybackParams;", "GetGetPlaybackParamsHandler", ApiSince=23)] get; [Android.Runtime.Register("setPlaybackParams", "(Landroid/media/PlaybackParams;)V", "GetSetPlaybackParams_Landroid_media_PlaybackParams_Handler", ApiSince=23)] set; }
[<get: Android.Runtime.Register("getPlaybackParams", "()Landroid/media/PlaybackParams;", "GetGetPlaybackParamsHandler", ApiSince=23)>]
[<set: Android.Runtime.Register("setPlaybackParams", "(Landroid/media/PlaybackParams;)V", "GetSetPlaybackParams_Landroid_media_PlaybackParams_Handler", ApiSince=23)>]
member this.PlaybackParams : Android.Media.PlaybackParams with get, set

Property Value

current PlaybackParams.

Attributes

Remarks

Property getter documentation:

Returns the current playback parameters. See #setPlaybackParams(PlaybackParams) to set playback parameters

Java documentation for android.media.AudioTrack.getPlaybackParams().

Property setter documentation:

Sets the playback parameters. This method returns failure if it cannot apply the playback parameters. One possible cause is that the parameters for speed or pitch are out of range. Another possible cause is that the AudioTrack is streaming (see #MODE_STREAM) and the buffer size is too small. For speeds greater than 1.0f, the AudioTrack buffer on configuration must be larger than the speed multiplied by the minimum size #getMinBufferSize(int, int, int)) to allow proper playback.

Java documentation for android.media.AudioTrack.setPlaybackParams(android.media.PlaybackParams).

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