Added in API level 33

BluetoothLeAudioCodecConfig


class BluetoothLeAudioCodecConfig : Parcelable
kotlin.Any
   ↳ android.bluetooth.BluetoothLeAudioCodecConfig

Represents the codec configuration for a Bluetooth LE Audio source device.

Contains the source codec type.

The source codec type values are the same as those supported by the device hardware.

Summary

Nested classes

Builder for BluetoothLeAudioCodecConfig.

Constants
static Int

Codec bits per sample 16.

static Int

Codec bits per sample 24.

static Int

Codec bits per sample 32.

static Int

Codec bits per sample 0.

static Int

Codec channel mode MONO.

static Int

Codec channel mode STEREO.

static Int

Codec channel mode NONE.

static Int

Codec priority default.

static Int

Codec priority disabled.

static Int

Codec priority highest.

static Int

Frame duration 10000 us.

static Int

Frame duration 7500 us.

static Int

Frame duration 0.

static Int

Codec sample rate 11025 Hz.

static Int

Codec sample rate 16000 Hz.

static Int

Codec sample rate 176400 Hz.

static Int

Codec sample rate 192000 Hz.

static Int

Codec sample rate 22050 Hz.

static Int

Codec sample rate 24000 Hz.

static Int

Codec sample rate 32000 Hz.

static Int

Codec sample rate 384000 Hz.

static Int

Codec sample rate 44100 Hz.

static Int

Codec sample rate 48000 Hz.

static Int

Codec sample rate 8000 Hz.

static Int

Codec sample rate 88200 Hz.

static Int

Codec sample rate 96000 Hz.

static Int

Codec sample rate 0 Hz.

static Int

static Int

Inherited constants
Public methods
Int

Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

Int

Returns the codec bits per sample.

Int

Returns the codec channel mode.

String

Gets the codec name.

Int

Returns the codec selection priority.

Int

Gets the codec type.

Int

Returns the frame duration.

Int

Returns the maximum octets per frame

Int

Returns the minimum octets per frame

Int

Returns the octets per frame

Int

Returns the codec sample rate.

Int

Returns a hash representation of this BluetoothLeAudioCodecConfig based on all the config values.

String

Unit
writeToParcel(out: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<BluetoothLeAudioCodecConfig!>

Parcelable.Creator interface implementation.

Constants

BITS_PER_SAMPLE_16

Added in API level 33
static val BITS_PER_SAMPLE_16: Int

Codec bits per sample 16.

Value: 1

BITS_PER_SAMPLE_24

Added in API level 33
static val BITS_PER_SAMPLE_24: Int

Codec bits per sample 24.

Value: 2

BITS_PER_SAMPLE_32

Added in API level 33
static val BITS_PER_SAMPLE_32: Int

Codec bits per sample 32.

Value: 8

BITS_PER_SAMPLE_NONE

Added in API level 33
static val BITS_PER_SAMPLE_NONE: Int

Codec bits per sample 0. Default value of the codec bits per sample.

Value: 0

CHANNEL_COUNT_1

Added in API level 33
static val CHANNEL_COUNT_1: Int

Codec channel mode MONO.

Value: 1

CHANNEL_COUNT_2

Added in API level 33
static val CHANNEL_COUNT_2: Int

Codec channel mode STEREO.

Value: 2

CHANNEL_COUNT_NONE

Added in API level 33
static val CHANNEL_COUNT_NONE: Int

Codec channel mode NONE. Default value of the codec channel mode.

Value: 0

CODEC_PRIORITY_DEFAULT

Added in API level 33
static val CODEC_PRIORITY_DEFAULT: Int

Codec priority default. Default value used for codec priority.

Value: 0

CODEC_PRIORITY_DISABLED

Added in API level 33
static val CODEC_PRIORITY_DISABLED: Int

Codec priority disabled. Used to indicate that this codec is disabled and should not be used.

Value: -1

CODEC_PRIORITY_HIGHEST

Added in API level 33
static val CODEC_PRIORITY_HIGHEST: Int

Codec priority highest. Used to indicate the highest priority a codec can have.

Value: 1000000

FRAME_DURATION_10000

Added in API level 33
static val FRAME_DURATION_10000: Int

Frame duration 10000 us.

Value: 2

FRAME_DURATION_7500

Added in API level 33
static val FRAME_DURATION_7500: Int

Frame duration 7500 us.

Value: 1

FRAME_DURATION_NONE

Added in API level 33
static val FRAME_DURATION_NONE: Int

Frame duration 0. Default value of the frame duration.

Value: 0

SAMPLE_RATE_11025

Added in API level 35
static val SAMPLE_RATE_11025: Int

Codec sample rate 11025 Hz.

Value: 2

SAMPLE_RATE_16000

Added in API level 33
static val SAMPLE_RATE_16000: Int

Codec sample rate 16000 Hz.

Value: 4

SAMPLE_RATE_176400

Added in API level 35
static val SAMPLE_RATE_176400: Int

Codec sample rate 176400 Hz.

Value: 1024

SAMPLE_RATE_192000

Added in API level 35
static val SAMPLE_RATE_192000: Int

Codec sample rate 192000 Hz.

Value: 2048

SAMPLE_RATE_22050

Added in API level 35
static val SAMPLE_RATE_22050: Int

Codec sample rate 22050 Hz.

Value: 8

SAMPLE_RATE_24000

Added in API level 33
static val SAMPLE_RATE_24000: Int

Codec sample rate 24000 Hz.

Value: 16

SAMPLE_RATE_32000

Added in API level 33
static val SAMPLE_RATE_32000: Int

Codec sample rate 32000 Hz.

Value: 32

SAMPLE_RATE_384000

Added in API level 35
static val SAMPLE_RATE_384000: Int

Codec sample rate 384000 Hz.

Value: 4096

SAMPLE_RATE_44100

Added in API level 33
static val SAMPLE_RATE_44100: Int

Codec sample rate 44100 Hz.

Value: 64

SAMPLE_RATE_48000

Added in API level 33
static val SAMPLE_RATE_48000: Int

Codec sample rate 48000 Hz.

Value: 128

SAMPLE_RATE_8000

Added in API level 33
static val SAMPLE_RATE_8000: Int

Codec sample rate 8000 Hz.

Value: 1

SAMPLE_RATE_88200

Added in API level 35
static val SAMPLE_RATE_88200: Int

Codec sample rate 88200 Hz.

Value: 256

SAMPLE_RATE_96000

Added in API level 35
static val SAMPLE_RATE_96000: Int

Codec sample rate 96000 Hz.

Value: 512

SAMPLE_RATE_NONE

Added in API level 33
static val SAMPLE_RATE_NONE: Int

Codec sample rate 0 Hz. Default value used for codec sample rate. Values are the bit mask as defined in the Bluetooth Assigned Numbers, Generic Audio, Supported_Sampling_Frequencies table.

Value: 0

SOURCE_CODEC_TYPE_INVALID

Added in API level 33
static val SOURCE_CODEC_TYPE_INVALID: Int
Value: 1000000

SOURCE_CODEC_TYPE_LC3

Added in API level 33
static val SOURCE_CODEC_TYPE_LC3: Int
Value: 0

Public methods

describeContents

Added in API level 33
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

equals

Added in API level 33
fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj the reference object with which to compare.
o This value may be null.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getChannelCount

Added in API level 33
fun getChannelCount(): Int

Returns the codec channel mode.

Return
Int 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

getCodecName

Added in API level 33
fun getCodecName(): String

Gets the codec name.

Return
String the codec name This value cannot be null.

getCodecPriority

Added in API level 33
fun getCodecPriority(): Int

Returns the codec selection priority.

The codec selection priority is relative to other codecs: larger value means higher priority.

Return
Int Value is android.bluetooth.BluetoothLeAudioCodecConfig#CODEC_PRIORITY_DISABLED, android.bluetooth.BluetoothLeAudioCodecConfig#CODEC_PRIORITY_DEFAULT, or android.bluetooth.BluetoothLeAudioCodecConfig#CODEC_PRIORITY_HIGHEST

getCodecType

Added in API level 33
fun getCodecType(): Int

Gets the codec type.

Return
Int the codec type Value is android.bluetooth.BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_LC3, or android.bluetooth.BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_INVALID

getMaxOctetsPerFrame

Added in API level 33
fun getMaxOctetsPerFrame(): Int

Returns the maximum octets per frame

getMinOctetsPerFrame

Added in API level 33
fun getMinOctetsPerFrame(): Int

Returns the minimum octets per frame

getOctetsPerFrame

Added in API level 33
fun getOctetsPerFrame(): Int

Returns the octets per frame

hashCode

Added in API level 33
fun hashCode(): Int

Returns a hash representation of this BluetoothLeAudioCodecConfig based on all the config values.

Return
Int a hash code value for this object.

toString

Added in API level 33
fun toString(): String
Return
String a string representation of the object.

writeToParcel

Added in API level 33
fun writeToParcel(
    out: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest The Parcel in which the object should be written. This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES
out Parcel: This value cannot be null.

Properties

CREATOR

Added in API level 33
static val CREATOR: Parcelable.Creator<BluetoothLeAudioCodecConfig!>

Parcelable.Creator interface implementation.