AudioOutputProvider.FormatConfig.Builder
public final class AudioOutputProvider.FormatConfig.Builder
Builder for FormatConfig instances.
Summary
Public methods
setAudioAttributes
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setAudioAttributes(AudioAttributes audioAttributes)
Sets the AudioAttributes.
setAudioSessionId
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setAudioSessionId(int audioSessionId)
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
public AudioOutputProvider.FormatConfig.Builder setEnableHighResolutionPcmOutput(
boolean enableHighResolutionPcmOutput
)
Sets whether to enable high resolution PCM output with more than 16 bits.
setEnableOffload
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setEnableOffload(boolean enableOffload)
Sets whether the audio output should enable offload.
This parameter should not generally affect the outcome of getFormatSupport.
setEnablePlaybackParameters
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setEnablePlaybackParameters(boolean enablePlaybackParameters)
Sets whether to control the playback parameters using the AudioOutput implementation.
This parameter should not generally affect the outcome of getFormatSupport.
setEnableTunneling
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setEnableTunneling(boolean enableTunneling)
Sets whether tunneling is enabled.
This parameter should not generally affect the outcome of getFormatSupport.
setOriginalMimeType
@UnstableApi
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setOriginalMimeType(@Nullable String originalMimeType)
Sets the original MIME type of the audio data before it was decoded to PCM, or null if not applicable.
This parameter should not generally affect the outcome of getFormatSupport.
setPreferredBufferSize
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setPreferredBufferSize(int preferredBufferSize)
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
public AudioOutputProvider.FormatConfig.Builder setPreferredDevice(@Nullable AudioDeviceInfo preferredDevice)
Sets the preferred AudioDeviceInfo, or null for no preference.
setVirtualDeviceId
@CanIgnoreReturnValue
public AudioOutputProvider.FormatConfig.Builder setVirtualDeviceId(int virtualDeviceId)
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.