Builder
class Builder
| kotlin.Any | |
| ↳ | android.bluetooth.BluetoothLeAudioCodecConfig.Builder |
Builder for BluetoothLeAudioCodecConfig.
By default, the codec type will be set to android.bluetooth.BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_INVALID
Summary
| Public constructors | |
|---|---|
Builder() |
|
Builder(config: BluetoothLeAudioCodecConfig) |
|
| Public methods | |
|---|---|
| BluetoothLeAudioCodecConfig |
build()Build |
| 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
Builder(config: BluetoothLeAudioCodecConfig)
| Parameters | |
|---|---|
config |
BluetoothLeAudioCodecConfig: This value cannot be null. |
Public methods
build
fun build(): BluetoothLeAudioCodecConfig
Build BluetoothLeAudioCodecConfig.
| Return | |
|---|---|
BluetoothLeAudioCodecConfig |
new BluetoothLeAudioCodecConfig built This value cannot be null. |
setBitsPerSample
fun setBitsPerSample(bitsPerSample: Int): BluetoothLeAudioCodecConfig.Builder
Set the bits per sample for LE audio codec config.
| Parameters | |
|---|---|
bitsPerSample |
Int: of this codec Value is either 0 or a combination of android.bluetooth.BluetoothLeAudioCodecConfig#BITS_PER_SAMPLE_NONE, android.bluetooth.BluetoothLeAudioCodecConfig#BITS_PER_SAMPLE_16, android.bluetooth.BluetoothLeAudioCodecConfig#BITS_PER_SAMPLE_24, and android.bluetooth.BluetoothLeAudioCodecConfig#BITS_PER_SAMPLE_32 |
| Return | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setChannelCount
fun setChannelCount(channelCount: Int): BluetoothLeAudioCodecConfig.Builder
Set the channel count for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
channelCount |
Int: of this codec Value is either 0 or a combination of android.bluetooth.BluetoothLeAudioCodecConfig#CHANNEL_COUNT_NONE, android.bluetooth.BluetoothLeAudioCodecConfig#CHANNEL_COUNT_1, and android.bluetooth.BluetoothLeAudioCodecConfig#CHANNEL_COUNT_2 |
| Return | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecPriority
fun setCodecPriority(codecPriority: Int): BluetoothLeAudioCodecConfig.Builder
Set codec priority for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
codecPriority |
Int: of this codec Value is android.bluetooth.BluetoothLeAudioCodecConfig#CODEC_PRIORITY_DISABLED, android.bluetooth.BluetoothLeAudioCodecConfig#CODEC_PRIORITY_DEFAULT, or android.bluetooth.BluetoothLeAudioCodecConfig#CODEC_PRIORITY_HIGHEST |
| Return | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecType
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
fun setFrameDuration(frameDuration: Int): BluetoothLeAudioCodecConfig.Builder
Set the frame duration for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
frameDuration |
Int: of this codec Value is either 0 or a combination of android.bluetooth.BluetoothLeAudioCodecConfig#FRAME_DURATION_NONE, android.bluetooth.BluetoothLeAudioCodecConfig#FRAME_DURATION_7500, android.bluetooth.BluetoothLeAudioCodecConfig#FRAME_DURATION_10000, and android.bluetooth.BluetoothLeAudioCodecConfig.FRAME_DURATION_20000 |
| Return | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setMaxOctetsPerFrame
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
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
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. |
setSampleRate
fun setSampleRate(sampleRate: Int): BluetoothLeAudioCodecConfig.Builder
Set sample rate for Bluetooth LE audio codec config.
| Return | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance This value cannot be null. |