AudioOutputProvider.FormatConfig.Builder


class AudioOutputProvider.FormatConfig.Builder


Builder for FormatConfig instances.

Summary

Public constructors

Builder(format: Format!)

Creates a new builder.

Public functions

AudioOutputProvider.FormatConfig!

Builds the FormatConfig.

AudioOutputProvider.FormatConfig.Builder!

Sets the AudioAttributes.

AudioOutputProvider.FormatConfig.Builder!

Sets the audio session ID.

AudioOutputProvider.FormatConfig.Builder!
@CanIgnoreReturnValue
setEnableHighResolutionPcmOutput(
    enableHighResolutionPcmOutput: Boolean
)

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

AudioOutputProvider.FormatConfig.Builder!

Sets whether the audio output should enable offload.

AudioOutputProvider.FormatConfig.Builder!

Sets whether to control the playback parameters using the AudioOutput implementation.

AudioOutputProvider.FormatConfig.Builder!

Sets whether tunneling is enabled.

AudioOutputProvider.FormatConfig.Builder!

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

AudioOutputProvider.FormatConfig.Builder!

Sets the preferred AudioDeviceInfo.

AudioOutputProvider.FormatConfig.Builder!

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

Public constructors

Builder

Builder(format: Format!)

Creates a new builder.

Public functions

setAudioSessionId

@CanIgnoreReturnValue
fun setAudioSessionId(audioSessionId: Int): AudioOutputProvider.FormatConfig.Builder!

Sets the audio session ID. The default value is AUDIO_SESSION_ID_UNSET.

This parameter should not generally affect the outcome of getFormatSupport.

setEnableHighResolutionPcmOutput

@CanIgnoreReturnValue
fun setEnableHighResolutionPcmOutput(
    enableHighResolutionPcmOutput: Boolean
): AudioOutputProvider.FormatConfig.Builder!

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

setEnableOffload

@CanIgnoreReturnValue
fun setEnableOffload(enableOffload: Boolean): AudioOutputProvider.FormatConfig.Builder!

Sets whether the audio output should enable offload.

This parameter should not generally affect the outcome of getFormatSupport.

setEnablePlaybackParameters

@CanIgnoreReturnValue
fun setEnablePlaybackParameters(enablePlaybackParameters: Boolean): AudioOutputProvider.FormatConfig.Builder!

Sets whether to control the playback parameters using the AudioOutput implementation.

This parameter should not generally affect the outcome of getFormatSupport.

setEnableTunneling

@CanIgnoreReturnValue
fun setEnableTunneling(enableTunneling: Boolean): AudioOutputProvider.FormatConfig.Builder!

Sets whether tunneling is enabled.

This parameter should not generally affect the outcome of getFormatSupport.

setPreferredBufferSize

@CanIgnoreReturnValue
fun setPreferredBufferSize(preferredBufferSize: Int): AudioOutputProvider.FormatConfig.Builder!

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

This parameter should not generally affect the outcome of getFormatSupport.

setPreferredDevice

@CanIgnoreReturnValue
fun setPreferredDevice(preferredDevice: AudioDeviceInfo?): AudioOutputProvider.FormatConfig.Builder!

Sets the preferred AudioDeviceInfo.

setVirtualDeviceId

@CanIgnoreReturnValue
fun setVirtualDeviceId(virtualDeviceId: Int): AudioOutputProvider.FormatConfig.Builder!

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

This parameter should not generally affect the outcome of getFormatSupport.