BluetoothLeAudioCodecConfig.Builder
public
static
final
class
BluetoothLeAudioCodecConfig.Builder
extends Object
| java.lang.Object | |
| ↳ | android.bluetooth.BluetoothLeAudioCodecConfig.Builder |
Builder for BluetoothLeAudioCodecConfig.
By default, the codec type will be set to BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_INVALID
Summary
Public constructors | |
|---|---|
Builder()
|
|
Builder(BluetoothLeAudioCodecConfig config)
|
|
Public methods | |
|---|---|
BluetoothLeAudioCodecConfig
|
build()
Build |
BluetoothLeAudioCodecConfig.Builder
|
setBitsPerSample(int bitsPerSample)
Set the bits per sample for LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setChannelCount(int channelCount)
Set the channel count for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setCodecPriority(int codecPriority)
Set codec priority for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setCodecType(int codecType)
Set codec type for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setFrameDuration(int frameDuration)
Set the frame duration for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setMaxOctetsPerFrame(int maxOctetsPerFrame)
Set the maximum octets per frame for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setMinOctetsPerFrame(int minOctetsPerFrame)
Set the minimum octets per frame for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setOctetsPerFrame(int octetsPerFrame)
Set the octets per frame for Bluetooth LE audio codec config. |
BluetoothLeAudioCodecConfig.Builder
|
setSampleRate(int sampleRate)
Set sample rate for Bluetooth LE audio codec config. |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (BluetoothLeAudioCodecConfig config)
| Parameters | |
|---|---|
config |
BluetoothLeAudioCodecConfig: This value cannot be null. |
Public methods
build
public BluetoothLeAudioCodecConfig build ()
Build BluetoothLeAudioCodecConfig.
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig |
new BluetoothLeAudioCodecConfig built
This value cannot be null. |
setBitsPerSample
public BluetoothLeAudioCodecConfig.Builder setBitsPerSample (int bitsPerSample)
Set the bits per sample for LE audio codec config.
| Parameters | |
|---|---|
bitsPerSample |
int: of this codec
Value is either 0 or a combination of BluetoothLeAudioCodecConfig.BITS_PER_SAMPLE_NONE, BluetoothLeAudioCodecConfig.BITS_PER_SAMPLE_16, BluetoothLeAudioCodecConfig.BITS_PER_SAMPLE_24, and BluetoothLeAudioCodecConfig.BITS_PER_SAMPLE_32 |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setChannelCount
public BluetoothLeAudioCodecConfig.Builder setChannelCount (int channelCount)
Set the channel count for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
channelCount |
int: of this codec
Value is either 0 or a combination of BluetoothLeAudioCodecConfig.CHANNEL_COUNT_NONE, BluetoothLeAudioCodecConfig.CHANNEL_COUNT_1, and BluetoothLeAudioCodecConfig.CHANNEL_COUNT_2 |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setCodecPriority
public BluetoothLeAudioCodecConfig.Builder setCodecPriority (int codecPriority)
Set codec priority for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
codecPriority |
int: of this codec
Value is BluetoothLeAudioCodecConfig.CODEC_PRIORITY_DISABLED, BluetoothLeAudioCodecConfig.CODEC_PRIORITY_DEFAULT, or BluetoothLeAudioCodecConfig.CODEC_PRIORITY_HIGHEST |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setCodecType
public BluetoothLeAudioCodecConfig.Builder setCodecType (int codecType)
Set codec type for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
codecType |
int: of this codec
Value is BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_LC3, BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_OPUS, BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_OPUS_HI_RES, or BluetoothLeAudioCodecConfig.SOURCE_CODEC_TYPE_INVALID |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setFrameDuration
public BluetoothLeAudioCodecConfig.Builder setFrameDuration (int frameDuration)
Set the frame duration for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
frameDuration |
int: of this codec
Value is either 0 or a combination of BluetoothLeAudioCodecConfig.FRAME_DURATION_NONE, BluetoothLeAudioCodecConfig.FRAME_DURATION_7500, BluetoothLeAudioCodecConfig.FRAME_DURATION_10000, and android.bluetooth.BluetoothLeAudioCodecConfig.FRAME_DURATION_20000 |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setMaxOctetsPerFrame
public BluetoothLeAudioCodecConfig.Builder setMaxOctetsPerFrame (int maxOctetsPerFrame)
Set the maximum octets per frame for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
maxOctetsPerFrame |
int: of this codec |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setMinOctetsPerFrame
public BluetoothLeAudioCodecConfig.Builder setMinOctetsPerFrame (int minOctetsPerFrame)
Set the minimum octets per frame for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
minOctetsPerFrame |
int: of this codec |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setOctetsPerFrame
public BluetoothLeAudioCodecConfig.Builder setOctetsPerFrame (int octetsPerFrame)
Set the octets per frame for Bluetooth LE audio codec config.
| Parameters | |
|---|---|
octetsPerFrame |
int: of this codec |
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |
setSampleRate
public BluetoothLeAudioCodecConfig.Builder setSampleRate (int sampleRate)
Set sample rate for Bluetooth LE audio codec config.
| Returns | |
|---|---|
BluetoothLeAudioCodecConfig.Builder |
the same Builder instance
This value cannot be null. |