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 |
|
| 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 |
Source codec type for LC3. |
| static Int |
Source codec type for Opus. |
| static Int |
Source codec type for Opus High Resolution. |
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean |
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 |
hashCode()Returns a hash representation of this BluetoothLeAudioCodecConfig based on all the config values. |
| String |
toString() |
| Unit |
writeToParcel(out: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<BluetoothLeAudioCodecConfig!> |
|
Constants
BITS_PER_SAMPLE_16
static val BITS_PER_SAMPLE_16: Int
Codec bits per sample 16.
Value: 1BITS_PER_SAMPLE_24
static val BITS_PER_SAMPLE_24: Int
Codec bits per sample 24.
Value: 2BITS_PER_SAMPLE_32
static val BITS_PER_SAMPLE_32: Int
Codec bits per sample 32.
Value: 8BITS_PER_SAMPLE_NONE
static val BITS_PER_SAMPLE_NONE: Int
Codec bits per sample 0. Default value of the codec bits per sample.
Value: 0CHANNEL_COUNT_1
static val CHANNEL_COUNT_1: Int
Codec channel mode MONO.
Value: 1CHANNEL_COUNT_2
static val CHANNEL_COUNT_2: Int
Codec channel mode STEREO.
Value: 2CHANNEL_COUNT_NONE
static val CHANNEL_COUNT_NONE: Int
Codec channel mode NONE. Default value of the codec channel mode.
Value: 0CODEC_PRIORITY_DEFAULT
static val CODEC_PRIORITY_DEFAULT: Int
Codec priority default. Default value used for codec priority.
Value: 0CODEC_PRIORITY_DISABLED
static val CODEC_PRIORITY_DISABLED: Int
Codec priority disabled. Used to indicate that this codec is disabled and should not be used.
Value: -1CODEC_PRIORITY_HIGHEST
static val CODEC_PRIORITY_HIGHEST: Int
Codec priority highest. Used to indicate the highest priority a codec can have.
Value: 1000000FRAME_DURATION_10000
static val FRAME_DURATION_10000: Int
Frame duration 10000 us.
Value: 2FRAME_DURATION_7500
static val FRAME_DURATION_7500: Int
Frame duration 7500 us.
Value: 1FRAME_DURATION_NONE
static val FRAME_DURATION_NONE: Int
Frame duration 0. Default value of the frame duration.
Value: 0SAMPLE_RATE_11025
static val SAMPLE_RATE_11025: Int
Codec sample rate 11025 Hz.
Value: 2SAMPLE_RATE_16000
static val SAMPLE_RATE_16000: Int
Codec sample rate 16000 Hz.
Value: 4SAMPLE_RATE_176400
static val SAMPLE_RATE_176400: Int
Codec sample rate 176400 Hz.
Value: 1024SAMPLE_RATE_192000
static val SAMPLE_RATE_192000: Int
Codec sample rate 192000 Hz.
Value: 2048SAMPLE_RATE_22050
static val SAMPLE_RATE_22050: Int
Codec sample rate 22050 Hz.
Value: 8SAMPLE_RATE_24000
static val SAMPLE_RATE_24000: Int
Codec sample rate 24000 Hz.
Value: 16SAMPLE_RATE_32000
static val SAMPLE_RATE_32000: Int
Codec sample rate 32000 Hz.
Value: 32SAMPLE_RATE_384000
static val SAMPLE_RATE_384000: Int
Codec sample rate 384000 Hz.
Value: 4096SAMPLE_RATE_44100
static val SAMPLE_RATE_44100: Int
Codec sample rate 44100 Hz.
Value: 64SAMPLE_RATE_48000
static val SAMPLE_RATE_48000: Int
Codec sample rate 48000 Hz.
Value: 128SAMPLE_RATE_8000
static val SAMPLE_RATE_8000: Int
Codec sample rate 8000 Hz.
Value: 1SAMPLE_RATE_88200
static val SAMPLE_RATE_88200: Int
Codec sample rate 88200 Hz.
Value: 256SAMPLE_RATE_96000
static val SAMPLE_RATE_96000: Int
Codec sample rate 96000 Hz.
Value: 512SAMPLE_RATE_NONE
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: 0SOURCE_CODEC_TYPE_INVALID
static val SOURCE_CODEC_TYPE_INVALID: Int
Value: 1000000SOURCE_CODEC_TYPE_LC3
static val SOURCE_CODEC_TYPE_LC3: Int
Source codec type for LC3.
Value: 0SOURCE_CODEC_TYPE_OPUS
static val SOURCE_CODEC_TYPE_OPUS: Int
Source codec type for Opus.
Value: 1SOURCE_CODEC_TYPE_OPUS_HI_RES
static val SOURCE_CODEC_TYPE_OPUS_HI_RES: Int
Source codec type for Opus High Resolution.
Value: 2Public methods
describeContents
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
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 returntrue. - It is symmetric: for any non-null reference values
xandy,x.equals(y)should returntrueif and only ify.equals(x)returnstrue. - It is transitive: for any non-null reference values
x,y, andz, ifx.equals(y)returnstrueandy.equals(z)returnstrue, thenx.equals(z)should returntrue. - It is consistent: for any non-null reference values
xandy, multiple invocations ofx.equals(y)consistently returntrueor consistently returnfalse, provided no information used inequalscomparisons on the objects is modified. - For any non-null reference value
x,x.equals(null)should returnfalse.
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. |
getBitsPerSample
fun getBitsPerSample(): Int
Returns the codec bits per sample.
getChannelCount
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
fun getCodecName(): String
Gets the codec name.
| Return | |
|---|---|
String |
the codec name This value cannot be null. |
getCodecPriority
fun getCodecPriority(): Int
Returns the codec selection priority.
The codec selection priority is relative to other codecs: larger value means higher priority.
getCodecType
fun getCodecType(): Int
Gets the codec type.
getFrameDuration
fun getFrameDuration(): Int
Returns the frame duration.
| Return | |
|---|---|
Int |
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 |
getMaxOctetsPerFrame
fun getMaxOctetsPerFrame(): Int
Returns the maximum octets per frame
getMinOctetsPerFrame
fun getMinOctetsPerFrame(): Int
Returns the minimum octets per frame
getSampleRate
fun getSampleRate(): Int
Returns the codec sample rate.
hashCode
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
fun toString(): String
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
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
static val CREATOR: Parcelable.Creator<BluetoothLeAudioCodecConfig!>
Parcelable.Creator interface implementation.