# Print output for @column tags ?>
public
class
AudioProfile
extends Object
java.lang.Object | |
↳ | android.media.AudioProfile |
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.
Constants | |
---|---|
int |
AUDIO_ENCAPSULATION_TYPE_IEC61937
Encapsulation format is defined in standard IEC 61937. |
int |
AUDIO_ENCAPSULATION_TYPE_NONE
No encapsulation type is specified. |
Public methods | |
---|---|
int[]
|
getChannelIndexMasks()
|
int[]
|
getChannelMasks()
|
int
|
getEncapsulationType()
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. |
int
|
getFormat()
|
int[]
|
getSampleRates()
|
String
|
toString()
Returns a string representation of the object. |
Inherited methods | |
---|---|
public static final int AUDIO_ENCAPSULATION_TYPE_IEC61937
Encapsulation format is defined in standard IEC 61937.
Constant Value: 1 (0x00000001)
public static final int AUDIO_ENCAPSULATION_TYPE_NONE
No encapsulation type is specified.
Constant Value: 0 (0x00000000)
public int[] getChannelIndexMasks ()
Returns | |
---|---|
int[] |
an array of channel index masks that are associated with the encoding format.
This value cannot be null . |
public int[] getChannelMasks ()
Returns | |
---|---|
int[] |
an array of channel position masks that are associated with the encoding format.
This value cannot be null . |
public int getEncapsulationType ()
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 AudioTrack
API is
supported. But playback with 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.
Returns | |
---|---|
int |
an integer representing the encapsulation type
Value is AUDIO_ENCAPSULATION_TYPE_NONE , or AUDIO_ENCAPSULATION_TYPE_IEC61937 |
public int getFormat ()
public int[] getSampleRates ()
Returns | |
---|---|
int[] |
an array of sample rates that are associated with the encoding format.
This value cannot be null . |
public String toString ()
Returns a string representation of the object. In general, the
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
Returns | |
---|---|
String |
a string representation of the object. |