AudioOutputProvider.OutputConfig.Builder


public final class AudioOutputProvider.OutputConfig.Builder


Builder for OutputConfig instances.

Summary

Public constructors

Creates a new instance.

Public methods

AudioOutputProvider.OutputConfig

Builds the OutputConfig.

AudioOutputProvider.OutputConfig.Builder

Sets the AudioAttributes.

AudioOutputProvider.OutputConfig.Builder

Sets the audio session ID.

AudioOutputProvider.OutputConfig.Builder

Sets the buffer size of the output in bytes.

AudioOutputProvider.OutputConfig.Builder

Sets the channel configuration of the output.

AudioOutputProvider.OutputConfig.Builder

Sets the C.Encoding of the audio data.

AudioOutputProvider.OutputConfig.Builder

Sets whether offload is enabled for this output.

AudioOutputProvider.OutputConfig.Builder
@CanIgnoreReturnValue
setIsTunneling(boolean isTunneling)

Sets whether tunneling is enabled for this output.

AudioOutputProvider.OutputConfig.Builder

Sets the sample rate of the audio data.

AudioOutputProvider.OutputConfig.Builder
@CanIgnoreReturnValue
setUseOffloadGapless(boolean useOffloadGapless)

Sets whether gapless offload playback is enabled for this output via setOffloadDelayPadding.

AudioOutputProvider.OutputConfig.Builder
@CanIgnoreReturnValue
setUsePlaybackParameters(boolean usePlaybackParameters)

Sets whether playback speed control is enabled for this output.

AudioOutputProvider.OutputConfig.Builder

Sets the virtual device ID, or INDEX_UNSET if not specified.

Public constructors

Builder

public Builder()

Creates a new instance.

Public methods

build

public AudioOutputProvider.OutputConfig build()

Builds the OutputConfig.

setAudioSessionId

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setAudioSessionId(int audioSessionId)

Sets the audio session ID.

setBufferSize

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setBufferSize(int bufferSize)

Sets the buffer size of the output in bytes.

setChannelConfig

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setChannelConfig(int channelConfig)

Sets the channel configuration of the output.

setEncoding

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setEncoding(@C.Encoding int encoding)

Sets the C.Encoding of the audio data.

setIsOffload

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setIsOffload(boolean isOffload)

Sets whether offload is enabled for this output.

setIsTunneling

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setIsTunneling(boolean isTunneling)

Sets whether tunneling is enabled for this output.

setSampleRate

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setSampleRate(int sampleRate)

Sets the sample rate of the audio data.

setUseOffloadGapless

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setUseOffloadGapless(boolean useOffloadGapless)

Sets whether gapless offload playback is enabled for this output via setOffloadDelayPadding.

setUsePlaybackParameters

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setUsePlaybackParameters(boolean usePlaybackParameters)

Sets whether playback speed control is enabled for this output.

setVirtualDeviceId

@CanIgnoreReturnValue
public AudioOutputProvider.OutputConfig.Builder setVirtualDeviceId(int virtualDeviceId)

Sets the virtual device ID, or INDEX_UNSET if not specified. The default value is INDEX_UNSET.