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 |
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: 1
BITS_PER_SAMPLE_24
static val BITS_PER_SAMPLE_24: Int
Codec bits per sample 24.
Value: 2
BITS_PER_SAMPLE_32
static val BITS_PER_SAMPLE_32: Int
Codec bits per sample 32.
Value: 8
BITS_PER_SAMPLE_NONE
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
static val CHANNEL_COUNT_1: Int
Codec channel mode MONO.
Value: 1
CHANNEL_COUNT_2
static val CHANNEL_COUNT_2: Int
Codec channel mode STEREO.
Value: 2
CHANNEL_COUNT_NONE
static val CHANNEL_COUNT_NONE: Int
Codec channel mode NONE. Default value of the codec channel mode.
Value: 0
CODEC_PRIORITY_DEFAULT
static val CODEC_PRIORITY_DEFAULT: Int
Codec priority default. Default value used for codec priority.
Value: 0
CODEC_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: -1
CODEC_PRIORITY_HIGHEST
static val CODEC_PRIORITY_HIGHEST: Int
Codec priority highest. Used to indicate the highest priority a codec can have.
Value: 1000000
FRAME_DURATION_10000
static val FRAME_DURATION_10000: Int
Frame duration 10000 us.
Value: 2
FRAME_DURATION_7500
static val FRAME_DURATION_7500: Int
Frame duration 7500 us.
Value: 1
FRAME_DURATION_NONE
static val FRAME_DURATION_NONE: Int
Frame duration 0. Default value of the frame duration.
Value: 0
SAMPLE_RATE_11025
static val SAMPLE_RATE_11025: Int
Codec sample rate 11025 Hz.
Value: 2
SAMPLE_RATE_16000
static val SAMPLE_RATE_16000: Int
Codec sample rate 16000 Hz.
Value: 4
SAMPLE_RATE_176400
static val SAMPLE_RATE_176400: Int
Codec sample rate 176400 Hz.
Value: 1024
SAMPLE_RATE_192000
static val SAMPLE_RATE_192000: Int
Codec sample rate 192000 Hz.
Value: 2048
SAMPLE_RATE_22050
static val SAMPLE_RATE_22050: Int
Codec sample rate 22050 Hz.
Value: 8
SAMPLE_RATE_24000
static val SAMPLE_RATE_24000: Int
Codec sample rate 24000 Hz.
Value: 16
SAMPLE_RATE_32000
static val SAMPLE_RATE_32000: Int
Codec sample rate 32000 Hz.
Value: 32
SAMPLE_RATE_384000
static val SAMPLE_RATE_384000: Int
Codec sample rate 384000 Hz.
Value: 4096
SAMPLE_RATE_44100
static val SAMPLE_RATE_44100: Int
Codec sample rate 44100 Hz.
Value: 64
SAMPLE_RATE_48000
static val SAMPLE_RATE_48000: Int
Codec sample rate 48000 Hz.
Value: 128
SAMPLE_RATE_8000
static val SAMPLE_RATE_8000: Int
Codec sample rate 8000 Hz.
Value: 1
SAMPLE_RATE_88200
static val SAMPLE_RATE_88200: Int
Codec sample rate 88200 Hz.
Value: 256
SAMPLE_RATE_96000
static val SAMPLE_RATE_96000: Int
Codec sample rate 96000 Hz.
Value: 512
SAMPLE_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: 0
SOURCE_CODEC_TYPE_INVALID
static val SOURCE_CODEC_TYPE_INVALID: Int
Value: 1000000
Public 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
x
andy
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any non-null reference values
x
,y
, andz
, ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
. - It is consistent: for any non-null reference values
x
andy
, multiple invocations ofx.equals(y)
consistently returntrue
or consistently returnfalse
, provided no information used inequals
comparisons 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.
Return | |
---|---|
Int |
the codec type Value is android.bluetooth.BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_LC3 , or android.bluetooth.BluetoothLeAudioCodecConfig#SOURCE_CODEC_TYPE_INVALID |
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 , and android.bluetooth.BluetoothLeAudioCodecConfig#FRAME_DURATION_10000 |
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.