AudioProfile
open class AudioProfile : Parcelable
An AudioProfile is specific to an audio format and lists supported sampling rates and channel masks for that format. An AudioDeviceInfo
has a list of supported AudioProfiles. There can be multiple profiles whose encoding format is the same. This usually happens when an encoding format is only supported when it is encapsulated by some particular encapsulation types. If there are multiple encapsulation types that can carry this encoding format, they will be reported in different audio profiles. The application can choose any of the encapsulation types.
Summary
Constants |
static Int |
Encapsulation format is defined in standard IEC 61937.
|
static Int |
No encapsulation type is specified.
|
static Int |
Encapsulation format is PCM, which can be used by other formats that can be wrapped in a PCM frame, such as DSD(Direct Stream Digital).
|
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public methods |
open Int |
|
open Boolean |
|
open IntArray |
|
open IntArray |
|
open Int |
The encapsulation type indicates what encapsulation type is required when the framework is using this format when playing to a device exposing this audio profile.
|
open Int |
|
open IntArray |
|
open Int |
|
open String |
|
open Unit |
Flatten this object in to a Parcel.
|
Constants
AUDIO_ENCAPSULATION_TYPE_IEC61937
static val AUDIO_ENCAPSULATION_TYPE_IEC61937: Int
Encapsulation format is defined in standard IEC 61937.
Value: 1
AUDIO_ENCAPSULATION_TYPE_NONE
static val AUDIO_ENCAPSULATION_TYPE_NONE: Int
No encapsulation type is specified.
Value: 0
AUDIO_ENCAPSULATION_TYPE_PCM
static val AUDIO_ENCAPSULATION_TYPE_PCM: Int
Encapsulation format is PCM, which can be used by other formats that can be wrapped in a PCM frame, such as DSD(Direct Stream Digital).
Value: 2
Public methods
describeContents
open fun describeContents(): Int
equals
open fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getChannelIndexMasks
open fun getChannelIndexMasks(): IntArray
Return |
IntArray |
an array of channel index masks that are associated with the encoding format. This value cannot be null . |
getChannelMasks
open fun getChannelMasks(): IntArray
Return |
IntArray |
an array of channel position masks that are associated with the encoding format. This value cannot be null . |
getEncapsulationType
open fun getEncapsulationType(): Int
The encapsulation type indicates what encapsulation type is required when the framework is using this format when playing to a device exposing this audio profile. When encapsulation is required, only playback with android.media.AudioTrack
API is supported. But playback with android.media.MediaPlayer
is not. When an encapsulation type is required, the AudioFormat
encoding selected when creating the AudioTrack
must match the encapsulation type, e.g AudioFormat.ENCODING_IEC61937 for AUDIO_ENCAPSULATION_TYPE_IEC61937.
open fun getFormat(): Int
Return |
Int |
the encoding format for this AudioProfile. Value is android.media.AudioFormat#ENCODING_DEFAULT , android.media.AudioFormat#ENCODING_PCM_16BIT , android.media.AudioFormat#ENCODING_PCM_8BIT , android.media.AudioFormat#ENCODING_PCM_FLOAT , android.media.AudioFormat#ENCODING_AC3 , android.media.AudioFormat#ENCODING_E_AC3 , android.media.AudioFormat#ENCODING_DTS , android.media.AudioFormat#ENCODING_DTS_HD , android.media.AudioFormat#ENCODING_MP3 , android.media.AudioFormat#ENCODING_AAC_LC , android.media.AudioFormat#ENCODING_AAC_HE_V1 , android.media.AudioFormat#ENCODING_AAC_HE_V2 , android.media.AudioFormat#ENCODING_IEC61937 , android.media.AudioFormat#ENCODING_DOLBY_TRUEHD , android.media.AudioFormat#ENCODING_AAC_ELD , android.media.AudioFormat#ENCODING_AAC_XHE , android.media.AudioFormat#ENCODING_AC4 , android.media.AudioFormat.ENCODING_AC4_L4, android.media.AudioFormat#ENCODING_E_AC3_JOC , android.media.AudioFormat#ENCODING_DOLBY_MAT , android.media.AudioFormat#ENCODING_OPUS , android.media.AudioFormat#ENCODING_PCM_24BIT_PACKED , android.media.AudioFormat#ENCODING_PCM_32BIT , android.media.AudioFormat#ENCODING_MPEGH_BL_L3 , android.media.AudioFormat#ENCODING_MPEGH_BL_L4 , android.media.AudioFormat#ENCODING_MPEGH_LC_L3 , android.media.AudioFormat#ENCODING_MPEGH_LC_L4 , android.media.AudioFormat#ENCODING_DTS_UHD_P1 , android.media.AudioFormat#ENCODING_DRA , android.media.AudioFormat#ENCODING_DTS_HD_MA , android.media.AudioFormat#ENCODING_DTS_UHD_P2 , or android.media.AudioFormat#ENCODING_DSD |
getSampleRates
open fun getSampleRates(): IntArray
Return |
IntArray |
an array of sample rates that are associated with the encoding format. This value cannot be null . |
hashCode
open fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
toString
open fun toString(): String
Return |
String |
a string representation of the object. |
writeToParcel
open fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Properties