Added in API level 31

AudioDescriptor


open class AudioDescriptor : Parcelable
kotlin.Any
   ↳ android.media.AudioDescriptor

The AudioDescriptor contains the information to describe the audio playback/capture capabilities. The capabilities are described by a byte array, which is defined by a particular standard. This is used when the format is unrecognized to the platform.

Summary

Constants
static Int

The Extended Display Identification Data (EDID) standard for a short audio descriptor.

static Int

The audio standard is not specified.

static Int

The standard for a Speaker Allocation Data Block (SADB).

static Int

The standard for a Vendor-Specific Audio Data Block (VSADB).

Inherited constants
Public methods
open Int

open Boolean
equals(other: Any?)

open ByteArray

open Int

The encapsulation type indicates what encapsulation type is required when the framework is using this extra audio descriptor for playing to a device exposing this audio profile.

open Int

open Int

open String

open Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<AudioDescriptor!>

Constants

STANDARD_EDID

Added in API level 31
static val STANDARD_EDID: Int

The Extended Display Identification Data (EDID) standard for a short audio descriptor.

Value: 1

STANDARD_NONE

Added in API level 31
static val STANDARD_NONE: Int

The audio standard is not specified.

Value: 0

STANDARD_SADB

Added in API level 34
static val STANDARD_SADB: Int

The standard for a Speaker Allocation Data Block (SADB).

Value: 2

STANDARD_VSADB

Added in API level 34
static val STANDARD_VSADB: Int

The standard for a Vendor-Specific Audio Data Block (VSADB).

Value: 3

Public methods

describeContents

Added in API level 33
open 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 31
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.

getDescriptor

Added in API level 31
open fun getDescriptor(): ByteArray
Return
ByteArray a byte array that describes audio playback/capture capabilities as encoded by the standard for this AudioDescriptor. This value cannot be null.

getEncapsulationType

Added in API level 31
open fun getEncapsulationType(): Int

The encapsulation type indicates what encapsulation type is required when the framework is using this extra audio descriptor for 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 AudioProfile.AUDIO_ENCAPSULATION_TYPE_IEC61937.

Return
Int an integer representing the encapsulation type Value is android.media.AudioProfile#AUDIO_ENCAPSULATION_TYPE_NONE, android.media.AudioProfile#AUDIO_ENCAPSULATION_TYPE_IEC61937, or android.media.AudioProfile#AUDIO_ENCAPSULATION_TYPE_PCM

getStandard

Added in API level 31
open fun getStandard(): Int
Return
Int the standard that defines audio playback/capture capabilities. Value is android.media.AudioDescriptor#STANDARD_NONE, android.media.AudioDescriptor#STANDARD_EDID, android.media.AudioDescriptor#STANDARD_SADB, or android.media.AudioDescriptor#STANDARD_VSADB

hashCode

Added in API level 31
open fun hashCode(): Int
Return
Int a hash code value for this object.

toString

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

writeToParcel

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

Flatten this object in to a Parcel.

Parameters
dest Parcel: 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

Properties

CREATOR

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