Builder
class Builder
| kotlin.Any | |
| ↳ | android.bluetooth.BluetoothCodecConfig.Builder |
Builder for BluetoothCodecConfig.
By default, the codec type will be set to android.bluetooth.BluetoothCodecConfig#SOURCE_CODEC_TYPE_INVALID, the codec priority to android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_DEFAULT, the sample rate to android.bluetooth.BluetoothCodecConfig#SAMPLE_RATE_NONE, the bits per sample to android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_NONE, the channel mode to android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_NONE, and all the codec specific values to 0.
Summary
| Public constructors | |
|---|---|
Builder() |
|
| Public methods | |
|---|---|
| BluetoothCodecConfig |
build()Build |
| BluetoothCodecConfig.Builder |
setBitsPerSample(bitsPerSample: Int)Set the bits per sample for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setChannelMode(channelMode: Int)Set the channel mode for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setCodecPriority(codecPriority: Int)Set codec priority for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setCodecSpecific1(codecSpecific1: Long)Set the first codec specific values for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setCodecSpecific2(codecSpecific2: Long)Set the second codec specific values for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setCodecSpecific3(codecSpecific3: Long)Set the third codec specific values for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setCodecSpecific4(codecSpecific4: Long)Set the fourth codec specific values for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setCodecType(codecType: Int)Set codec type for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setExtendedCodecType(codecType: BluetoothCodecType?)Set codec type for Bluetooth codec config. |
| BluetoothCodecConfig.Builder |
setSampleRate(sampleRate: Int)Set sample rate for Bluetooth codec config. |
Public constructors
Public methods
build
fun build(): BluetoothCodecConfig
Build BluetoothCodecConfig.
| Return | |
|---|---|
BluetoothCodecConfig |
new BluetoothCodecConfig built This value cannot be null. |
setBitsPerSample
fun setBitsPerSample(bitsPerSample: Int): BluetoothCodecConfig.Builder
Set the bits per sample for Bluetooth codec config.
| Parameters | |
|---|---|
bitsPerSample |
Int: of this codec Value is android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_NONE, android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_16, android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_24, or android.bluetooth.BluetoothCodecConfig#BITS_PER_SAMPLE_32 |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setChannelMode
fun setChannelMode(channelMode: Int): BluetoothCodecConfig.Builder
Set the channel mode for Bluetooth codec config.
| Parameters | |
|---|---|
channelMode |
Int: of this codec Value is android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_NONE, android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_MONO, or android.bluetooth.BluetoothCodecConfig#CHANNEL_MODE_STEREO |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecPriority
fun setCodecPriority(codecPriority: Int): BluetoothCodecConfig.Builder
Set codec priority for Bluetooth codec config.
| Parameters | |
|---|---|
codecPriority |
Int: of this codec Value is android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_DISABLED, android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_DEFAULT, or android.bluetooth.BluetoothCodecConfig#CODEC_PRIORITY_HIGHEST |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecSpecific1
fun setCodecSpecific1(codecSpecific1: Long): BluetoothCodecConfig.Builder
Set the first codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific1 |
Long: codec specific value or 0 if default |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecSpecific2
fun setCodecSpecific2(codecSpecific2: Long): BluetoothCodecConfig.Builder
Set the second codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific2 |
Long: codec specific value or 0 if default |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecSpecific3
fun setCodecSpecific3(codecSpecific3: Long): BluetoothCodecConfig.Builder
Set the third codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific3 |
Long: codec specific value or 0 if default |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecSpecific4
fun setCodecSpecific4(codecSpecific4: Long): BluetoothCodecConfig.Builder
Set the fourth codec specific values for Bluetooth codec config.
| Parameters | |
|---|---|
codecSpecific4 |
Long: codec specific value or 0 if default |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setCodecType
funsetCodecType(codecType: Int): BluetoothCodecConfig.Builder
Deprecated: use BluetoothCodecType instead
Set codec type for Bluetooth codec config.
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setExtendedCodecType
fun setExtendedCodecType(codecType: BluetoothCodecType?): BluetoothCodecConfig.Builder
Set codec type for Bluetooth codec config.
| Parameters | |
|---|---|
codecType |
BluetoothCodecType?: of this codec This value may be null. |
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |
setSampleRate
fun setSampleRate(sampleRate: Int): BluetoothCodecConfig.Builder
Set sample rate for Bluetooth codec config.
| Return | |
|---|---|
BluetoothCodecConfig.Builder |
the same Builder instance This value cannot be null. |