Language

AudioTrack.Builder.SetOffloadedPlayback(Boolean) Method

Definition

Sets whether this track will play through the offloaded audio path.

[Android.Runtime.Register("setOffloadedPlayback", "(Z)Landroid/media/AudioTrack$Builder;", "GetSetOffloadedPlayback_ZHandler", ApiSince=29)]
public virtual Android.Media.AudioTrack.Builder SetOffloadedPlayback(bool offload);
[<Android.Runtime.Register("setOffloadedPlayback", "(Z)Landroid/media/AudioTrack$Builder;", "GetSetOffloadedPlayback_ZHandler", ApiSince=29)>]
abstract member SetOffloadedPlayback : bool -> Android.Media.AudioTrack.Builder
override this.SetOffloadedPlayback : bool -> Android.Media.AudioTrack.Builder

Parameters

offload
Boolean

true to require the offload path for playback.

Returns

the same Builder instance. This value cannot be null.

Attributes

Remarks

Sets whether this track will play through the offloaded audio path. When set to true, at build time, the audio format will be checked against AudioManager.isOffloadedPlaybackSupported(AudioFormat,AudioAttributes) to verify the audio format used by this track is supported on the device's offload path (if any). Offload is only supported for media audio streams, and therefore requires that the usage be AudioAttributes.USAGE_MEDIA.

Android reference for android.media.AudioTrack.Builder.setOffloadedPlayback.

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