AudioOutputProvider.FormatConfig


public final class AudioOutputProvider.FormatConfig


Configuration for an audio format and its output preferences.

Summary

Nested types

Builder for FormatConfig instances.

Public fields

final AudioAttributes

The AudioAttributes to use for playback.

final int

The audio session ID, or AUDIO_SESSION_ID_UNSET if not set.

final boolean

Sets whether to enable high resolution PCM output with more than 16 bits.

final boolean

Whether the audio output should enable offload.

final boolean

Whether to control the playback speed using the audio output.

final boolean

Whether tunneling is enabled.

final Format

The Format of the audio.

final int

The preferred buffer size in bytes, or LENGTH_UNSET if no preference is specified.

final @Nullable AudioDeviceInfo

The preferred AudioDeviceInfo for audio output.

final int

The virtual device ID, or INDEX_UNSET if not specified.

Public methods

AudioOutputProvider.FormatConfig.Builder

Returns a Builder initialized with the values of this instance.

Public fields

audioAttributes

public final AudioAttributes audioAttributes

The AudioAttributes to use for playback.

audioSessionId

public final int audioSessionId

The audio session ID, or AUDIO_SESSION_ID_UNSET if not set.

This parameter should not generally affect the outcome of getFormatSupport.

enableHighResolutionPcmOutput

public final boolean enableHighResolutionPcmOutput

Sets whether to enable high resolution PCM output with more than 16 bits.

enableOffload

public final boolean enableOffload

Whether the audio output should enable offload.

This parameter should not generally affect the outcome of getFormatSupport.

enablePlaybackParameters

public final boolean enablePlaybackParameters

Whether to control the playback speed using the audio output.

This parameter should not generally affect the outcome of getFormatSupport.

enableTunneling

public final boolean enableTunneling

Whether tunneling is enabled.

This parameter should not generally affect the outcome of getFormatSupport.

format

public final Format format

The Format of the audio.

preferredBufferSize

public final int preferredBufferSize

The preferred buffer size in bytes, or LENGTH_UNSET if no preference is specified.

This parameter should not generally affect the outcome of getFormatSupport.

preferredDevice

public final @Nullable AudioDeviceInfo preferredDevice

The preferred AudioDeviceInfo for audio output.

virtualDeviceId

public final int virtualDeviceId

The virtual device ID, or INDEX_UNSET if not specified.

This parameter should not generally affect the outcome of getFormatSupport.

Public methods

buildUpon

public AudioOutputProvider.FormatConfig.Builder buildUpon()

Returns a Builder initialized with the values of this instance.