Added in API level 33

Builder


class Builder

Builder for BluetoothLeAudioCodecConfig.

By default, the codec type will be set to android.bluetooth.BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_INVALID

Summary

Public constructors

Public methods
BluetoothLeAudioCodecConfig

Build BluetoothLeAudioCodecConfig.

BluetoothLeAudioCodecConfig.Builder
setBitsPerSample(bitsPerSample: Int)

Set the bits per sample for LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setChannelCount(channelCount: Int)

Set the channel count for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setCodecPriority(codecPriority: Int)

Set codec priority for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setCodecType(codecType: Int)

Set codec type for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setFrameDuration(frameDuration: Int)

Set the frame duration for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setMaxOctetsPerFrame(maxOctetsPerFrame: Int)

Set the maximum octets per frame for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setMinOctetsPerFrame(minOctetsPerFrame: Int)

Set the minimum octets per frame for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setOctetsPerFrame(octetsPerFrame: Int)

Set the octets per frame for Bluetooth LE audio codec config.

BluetoothLeAudioCodecConfig.Builder
setSampleRate(sampleRate: Int)

Set sample rate for Bluetooth LE audio codec config.

Public constructors

Builder

Added in API level 33
Builder()

Builder

Added in API level 33
Builder(config: BluetoothLeAudioCodecConfig)
Parameters
config BluetoothLeAudioCodecConfig: This value cannot be null.

Public methods

build

Added in API level 33
fun build(): BluetoothLeAudioCodecConfig

Build BluetoothLeAudioCodecConfig.

Return
BluetoothLeAudioCodecConfig new BluetoothLeAudioCodecConfig built This value cannot be null.

setBitsPerSample

Added in API level 33
fun setBitsPerSample(bitsPerSample: Int): BluetoothLeAudioCodecConfig.Builder

Set the bits per sample for LE audio codec config.

Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setChannelCount

Added in API level 33
fun setChannelCount(channelCount: Int): BluetoothLeAudioCodecConfig.Builder

Set the channel count for Bluetooth LE audio codec config.

Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecPriority

Added in API level 33
fun setCodecPriority(codecPriority: Int): BluetoothLeAudioCodecConfig.Builder

Set codec priority for Bluetooth LE audio codec config.

Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setCodecType

Added in API level 33
fun setCodecType(codecType: Int): BluetoothLeAudioCodecConfig.Builder

Set codec type for Bluetooth LE audio codec config.

Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setFrameDuration

Added in API level 33
fun setFrameDuration(frameDuration: Int): BluetoothLeAudioCodecConfig.Builder

Set the frame duration for Bluetooth LE audio codec config.

Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setMaxOctetsPerFrame

Added in API level 33
fun setMaxOctetsPerFrame(maxOctetsPerFrame: Int): BluetoothLeAudioCodecConfig.Builder

Set the maximum octets per frame for Bluetooth LE audio codec config.

Parameters
maxOctetsPerFrame Int: of this codec
Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setMinOctetsPerFrame

Added in API level 33
fun setMinOctetsPerFrame(minOctetsPerFrame: Int): BluetoothLeAudioCodecConfig.Builder

Set the minimum octets per frame for Bluetooth LE audio codec config.

Parameters
minOctetsPerFrame Int: of this codec
Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.

setOctetsPerFrame

Added in API level 33
fun setOctetsPerFrame(octetsPerFrame: Int): BluetoothLeAudioCodecConfig.Builder

Set the octets per frame for Bluetooth LE audio codec config.

Parameters
octetsPerFrame Int: of this codec
Return
BluetoothLeAudioCodecConfig.Builder the same Builder instance This value cannot be null.