Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/media/AudioFormat#nestedclasses) \| [Constants](https://developer.android.com/reference/android/media/AudioFormat#constants) \| [Inherited Constants](https://developer.android.com/reference/android/media/AudioFormat#inhconstants) \| [Fields](https://developer.android.com/reference/android/media/AudioFormat#lfields) \| [Methods](https://developer.android.com/reference/android/media/AudioFormat#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/media/AudioFormat#inhmethods)

# AudioFormat

*** ** * ** ***


`
public

final

class
AudioFormat
`


`

extends https://developer.android.com/reference/java/lang/Object


`

`


implements

https://developer.android.com/reference/android/os/Parcelable


`

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.media.AudioFormat |

<br />

*** ** * ** ***

The `https://developer.android.com/reference/android/media/AudioFormat` class is used to access a number of audio format and
channel configuration constants. They are for instance used
in `https://developer.android.com/reference/android/media/AudioTrack` and `https://developer.android.com/reference/android/media/AudioRecord`, as valid values in individual parameters of
constructors like `https://developer.android.com/reference/android/media/AudioTrack#AudioTrack(int,%20int,%20int,%20int,%20int,%20int)`, where the fourth
parameter is one of the `AudioFormat.ENCODING_*` constants.
The `AudioFormat` constants are also used in `https://developer.android.com/reference/android/media/MediaFormat` to specify
audio related values commonly used in media, such as for `https://developer.android.com/reference/android/media/MediaFormat#KEY_CHANNEL_MASK`.

The `https://developer.android.com/reference/android/media/AudioFormat.Builder` class can be used to create instances of
the `AudioFormat` format class.
Refer to
`https://developer.android.com/reference/android/media/AudioFormat.Builder` for documentation on the mechanics of the configuration and building
of such instances. Here we describe the main concepts that the `AudioFormat` class
allow you to convey in each instance, they are:

1. [sample rate](https://developer.android.com/reference/android/media/AudioFormat#sampleRate)
2. [encoding](https://developer.android.com/reference/android/media/AudioFormat#encoding)
3. [channel masks](https://developer.android.com/reference/android/media/AudioFormat#channelMask)

Closely associated with the `AudioFormat` is the notion of an
[audio frame](https://developer.android.com/reference/android/media/AudioFormat#audioFrame), which is used throughout the documentation
to represent the minimum size complete unit of audio data.

#### Sample rate

Expressed in Hz, the sample rate in an `AudioFormat` instance expresses the number
of audio samples for each channel per second in the content you are playing or recording. It is
not the sample rate
at which content is rendered or produced. For instance a sound at a media sample rate of 8000Hz
can be played on a device operating at a sample rate of 48000Hz; the sample rate conversion is
automatically handled by the platform, it will not play at 6x speed.

As of API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`,
sample rates up to 192kHz are supported
for `AudioRecord` and `AudioTrack`, with sample rate conversion
performed as needed.
To improve efficiency and avoid lossy conversions, it is recommended to match the sample rate
for `AudioRecord` and `AudioTrack` to the endpoint device
sample rate, and limit the sample rate to no more than 48kHz unless there are special
device capabilities that warrant a higher rate.

#### Encoding

Audio encoding is used to describe the bit representation of audio data, which can be
either linear PCM or compressed audio, such as AC3 or DTS.

For linear PCM, the audio encoding describes the sample size, 8 bits, 16 bits, or 32 bits,
and the sample representation, integer or float.

- `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_8BIT`: The audio sample is a 8 bit unsigned integer in the range \[0, 255\], with a 128 offset for zero. This is typically stored as a Java byte in a byte array or ByteBuffer. Since the Java byte is *signed*, be careful with math operations and conversions as the most significant bit is inverted.
- `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_16BIT`: The audio sample is a 16 bit signed integer typically stored as a Java short in a short array, but when the short is stored in a ByteBuffer, it is native endian (as compared to the default Java big endian). The short has full range from \[-32768, 32767\], and is sometimes interpreted as fixed point Q.15 data.
- `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_FLOAT`: Introduced in API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP`, this encoding specifies that the audio sample is a 32 bit IEEE single precision float. The sample can be manipulated as a Java float in a float array, though within a ByteBuffer it is stored in native endian byte order. The nominal range of `ENCODING_PCM_FLOAT` audio data is \[-1.0, 1.0\]. It is implementation dependent whether the positive maximum of 1.0 is included in the interval. Values outside of the nominal range are clamped before sending to the endpoint device. Beware that the handling of NaN is undefined; subnormals may be treated as zero; and infinities are generally clamped just like other values for `AudioTrack` -- try to avoid infinities because they can easily generate a NaN.   
  To achieve higher audio bit depth than a signed 16 bit integer short, it is recommended to use `ENCODING_PCM_FLOAT` for audio capture, processing, and playback. Floats are efficiently manipulated by modern CPUs, have greater precision than 24 bit signed integers, and have greater dynamic range than 32 bit signed integers. `AudioRecord` as of API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M` and `AudioTrack` as of API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#LOLLIPOP` support `ENCODING_PCM_FLOAT`.
- `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_24BIT_PACKED`: Introduced in API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#S`, this encoding specifies the audio sample is an extended precision 24 bit signed integer stored as a 3 Java bytes in a `ByteBuffer` or byte array in native endian (see `https://developer.android.com/reference/java/nio/ByteOrder#nativeOrder()`). Each sample has full range from \[-8388608, 8388607\], and can be interpreted as fixed point Q.23 data.
- `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_32BIT`: Introduced in API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#S`, this encoding specifies the audio sample is an extended precision 32 bit signed integer stored as a 4 Java bytes in a `ByteBuffer` or byte array in native endian (see `https://developer.android.com/reference/java/nio/ByteOrder#nativeOrder()`). Each sample has full range from \[-2147483648, 2147483647\], and can be interpreted as fixed point Q.31 data.

For compressed audio, the encoding specifies the method of compression,
for example `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC3` and `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS`. The compressed
audio data is typically stored as bytes in
a byte array or ByteBuffer. When a compressed audio encoding is specified
for an `AudioTrack`, it creates a direct (non-mixed) track
for output to an endpoint (such as HDMI) capable of decoding the compressed audio.
For (most) other endpoints, which are not capable of decoding such compressed audio,
you will need to decode the data first, typically by creating a `https://developer.android.com/reference/android/media/MediaCodec`.
Alternatively, one may use `https://developer.android.com/reference/android/media/MediaPlayer` for playback of compressed
audio files or streams.

When compressed audio is sent out through a direct `AudioTrack`,
it need not be written in exact multiples of the audio access unit;
this differs from `MediaCodec` input buffers.

#### Channel mask

Channel masks are used in `AudioTrack` and `AudioRecord` to describe
the samples and their arrangement in the audio frame. They are also used in the endpoint (e.g.
a USB audio interface, a DAC connected to headphones) to specify allowable configurations of a
particular device.

As of API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`, there are two types of channel masks:
channel position masks and channel index masks.

##### Channel position masks

Channel position masks are the original Android channel masks, and are used since API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#BASE`. For input and output, they imply a positional nature - the location of a speaker or a microphone for recording or playback.   
For a channel position mask, each allowed channel position corresponds to a bit in the channel mask. If that channel position is present in the audio frame, that bit is set, otherwise it is zero. The order of the bits (from lsb to msb) corresponds to the order of that position's sample in the audio frame.   
The canonical channel position masks by channel count are as follows:   

|---|---|
| channel count | channel position mask |
| 1 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_MONO` |
| 2 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO` |
| 3 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO` \| `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_CENTER` |
| 4 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_QUAD` |
| 5 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_QUAD` \| `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_CENTER` |
| 6 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_5POINT1` |
| 7 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_5POINT1` \| `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_CENTER` |
| 8 | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1_SURROUND` |

<br />

These masks are an ORed composite of individual channel masks. For example `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO` is composed of `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_LEFT` and `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_RIGHT`.


The following diagram represents the layout of the output channels, as seen from above
the listener (in the center at the "lis" position, facing the front-center channel).

```
      TFL --- TFC --- TFR     T is Top
      |  \       |       /  |
      |   FL --- FC --- FR  |     F is Front
      |   |\     |     /|   |
      |   | BFL-BFC-BFR |   |     BF is Bottom Front
      |   |             |   |
      |   FWL   lis   FWR   |     W is Wide
      |   |             |   |
     TSL  SL    TC     SR  TSR    S is Side
      |   |             |   |
      |   BL --- BC -- BR   |     B is Back
      |  /               \  |
      TBL --- TBC --- TBR     C is Center, L/R is Left/Right
```
All "T" (top) channels are above the listener, all "BF" (bottom-front) channels are below the listener, all others are in the listener's horizontal plane. When used in conjunction, LFE1 and LFE2 are below the listener, when used alone, LFE plane is undefined. See the channel definitions for the abbreviations

##### Channel index masks

Channel index masks are introduced in API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#M`. They allow the selection of a particular channel from the source or sink endpoint by number, i.e. the first channel, the second channel, and so forth. This avoids problems with artificially assigning positions to channels of an endpoint, or figuring what the i^th^ position bit is within an endpoint's channel position mask etc.   
Here's an example where channel index masks address this confusion: dealing with a 4 channel USB device. Using a position mask, and based on the channel count, this would be a `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_QUAD` device, but really one is only interested in channel 0 through channel 3. The USB device would then have the following individual bit channel masks: `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_LEFT`, `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_RIGHT`, `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_LEFT` and `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_RIGHT`. But which is channel 0 and which is channel 3?   
For a channel index mask, each channel number is represented as a bit in the mask, from the lsb (channel 0) upwards to the msb, numerically this bit value is `1 << channelNumber`. A set bit indicates that channel is present in the audio frame, otherwise it is cleared. The order of the bits also correspond to that channel number's sample order in the audio frame.   
For the previous 4 channel USB device example, the device would have a channel index mask `0xF`. Suppose we wanted to select only the first and the third channels; this would correspond to a channel index mask `0x5` (the first and third bits set). If an `AudioTrack` uses this channel index mask, the audio frame would consist of two samples, the first sample of each frame routed to channel 0, and the second sample of each frame routed to channel 2. The canonical channel index masks by channel count are given by the formula `(1 << channelCount) - 1`.

##### Use cases

- *Channel position mask for an endpoint:* `CHANNEL_OUT_FRONT_LEFT`, `CHANNEL_OUT_FRONT_CENTER`, etc. for HDMI home theater purposes.
- *Channel position mask for an audio stream:* Creating an `AudioTrack` to output movie content, where 5.1 multichannel output is to be written.
- *Channel index mask for an endpoint:* USB devices for which input and output do not correspond to left or right speaker or microphone.
- *Channel index mask for an audio stream:* An `AudioRecord` may only want the third and fourth audio channels of the endpoint (i.e. the second channel pair), and not care the about position it corresponds to, in which case the channel index mask is `0xC`. Multichannel `AudioRecord` sessions should use channel index masks.

##### Ambisonics channel masks

<br />

As of API `https://developer.android.com/reference/android/os/Build.VERSION_CODES#CINNAMON_BUN`, another type of channel mask has been added: Ambisonics. This channel mask is used when dealing with audio scenes encoded using [the corresponding spatial format.](https://en.wikipedia.org/wiki/Ambisonics) The inherent requirement of the Ambisonics representation is that it uses certain channel counts that depend on the **order** used. The formula for calculating the channel count for **full
sphere** Ambisonics representation is `(N + 1) ^ 2` where `N` is the order. The minimum order supported is `0` (`https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_0`) which uses 1 channel, and the maximum order is `14` (`https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_14`) which uses 225 channels. Since mobile devices may not possess enough power for dealing with such huge number of channels, the framework also allows using "horizontal-only" representation which significantly reduces the number of channels compared to full sphere. For the horizontal-only representation the number of channels is calculated using the formula `(2 * N + 1)`, thus the 14th horizontal-only representation `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_14_HRZ` uses only 29 channels. The Ambisonics channel mask actually only stores the number of channels used, and the flag `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_HORIZONTAL` for specifying whether it's a horizontal-only representation. Android assumes that the Ambisonics representation uses ACN channel order and SN3D normalization.

#### Audio Frame

For linear PCM, an audio frame consists of a set of samples captured at the same time,
whose count and
channel association are given by the [channel mask](https://developer.android.com/reference/android/media/AudioFormat#channelMask),
and whose sample contents are specified by the [encoding](https://developer.android.com/reference/android/media/AudioFormat#encoding).
For example, a stereo 16 bit PCM frame consists of
two 16 bit linear PCM samples, with a frame size of 4 bytes.
For compressed audio, an audio frame may alternately
refer to an access unit of compressed data bytes that is logically grouped together for
decoding and bitstream access (e.g. `https://developer.android.com/reference/android/media/MediaCodec`),
or a single byte of compressed data (e.g. `https://developer.android.com/reference/android/media/AudioTrack#getBufferSizeInFrames()`),
or the linear PCM frame result from decoding the compressed data
(e.g.`https://developer.android.com/reference/android/media/AudioTrack#getPlaybackHeadPosition()`),
depending on the context where audio frame is used.
For the purposes of `https://developer.android.com/reference/android/media/AudioFormat#getFrameSizeInBytes()`, a compressed data format
returns a frame size of 1 byte.

## Summary

| ### Nested classes ||
|---|---|
| ` class` | `https://developer.android.com/reference/android/media/AudioFormat.Builder` Builder class for `https://developer.android.com/reference/android/media/AudioFormat` objects. |

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_HORIZONTAL` Ambisonics channel mask flag for the horizontal-only representation. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_0` Ambisonics channel mask for order 0. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_0_HRZ` Ambisonics horizontal-only channel mask for order 0. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_1` Ambisonics channel mask for order 1. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_10` Ambisonics channel mask for order 10. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_10_HRZ` Ambisonics horizontal-only channel mask for order 10. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_11` Ambisonics channel mask for order 11. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_11_HRZ` Ambisonics horizontal-only channel mask for order 11. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_12` Ambisonics channel mask for order 12. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_12_HRZ` Ambisonics horizontal-only channel mask for order 12. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_13` Ambisonics channel mask for order 13. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_13_HRZ` Ambisonics horizontal-only channel mask for order 13. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_14` Ambisonics channel mask for order 14. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_14_HRZ` Ambisonics horizontal-only channel mask for order 14. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_1_HRZ` Ambisonics horizontal-only channel mask for order 1. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_2` Ambisonics channel mask for order 2. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_2_HRZ` Ambisonics horizontal-only channel mask for order 2. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_3` Ambisonics channel mask for order 3. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_3_HRZ` Ambisonics horizontal-only channel mask for order 3. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_4` Ambisonics channel mask for order 4. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_4_HRZ` Ambisonics horizontal-only channel mask for order 4. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_5` Ambisonics channel mask for order 5. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_5_HRZ` Ambisonics horizontal-only channel mask for order 5. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_6` Ambisonics channel mask for order 6. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_6_HRZ` Ambisonics horizontal-only channel mask for order 6. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_7` Ambisonics channel mask for order 7. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_7_HRZ` Ambisonics horizontal-only channel mask for order 7. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_8` Ambisonics channel mask for order 8. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_8_HRZ` Ambisonics horizontal-only channel mask for order 8. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_9` Ambisonics channel mask for order 9. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_ACN_ORDER_9_HRZ` Ambisonics horizontal-only channel mask for order 9. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_CONFIGURATION_DEFAULT` *This constant was deprecated in API level 15. Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_DEFAULT` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_DEFAULT` instead.* |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_CONFIGURATION_INVALID` *This constant was deprecated in API level 15. Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` instead.* |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_CONFIGURATION_MONO` *This constant was deprecated in API level 15. Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_MONO` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_MONO` instead.* |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_CONFIGURATION_STEREO` *This constant was deprecated in API level 15. Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_STEREO` instead.* |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` Invalid audio channel mask |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_BACK` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_BACK_PROCESSED` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_DEFAULT` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_FRONT` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_FRONT_PROCESSED` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_LEFT` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_LEFT_PROCESSED` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_MONO` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_PRESSURE` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_RIGHT` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_RIGHT_PROCESSED` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_STEREO` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_VOICE_DNLINK` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_VOICE_UPLINK` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_X_AXIS` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_Y_AXIS` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_Z_AXIS` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_13POINT0` Output channel mask for 13.0 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_5POINT1` Output channel mask for 5.1 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_5POINT1POINT2` Output channel mask for 5.1.2 Same as 5.1 with the addition of left and right top channels |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_5POINT1POINT4` Output channel mask for 5.1.4 Same as 5.1 with the addition of four top channels |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_6POINT1` Output channel mask for 6.1 Same as 5.1 with the addition of the back center channel |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1` *This constant was deprecated in API level 23. Not the typical 7.1 surround configuration. Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1_SURROUND` instead.* |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1POINT2` Output channel mask for 7.1.2 Same as 7.1 with the addition of left and right top channels |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1POINT4` Output channel mask for 7.1.4 Same as 7.1 with the addition of four top channels |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1_SURROUND` Output channel mask for 7.1 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_9POINT1POINT4` Output channel mask for 9.1.4 Same as 7.1.4 with the addition of left and right front wide channels |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_9POINT1POINT6` Output channel mask for 9.1.6 Same as 9.1.4 with the addition of left and right top side channels |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_CENTER` Back center output channel (see BC in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_LEFT` Back left output channel (see BL in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BACK_RIGHT` Back right output channel (see BR in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BOTTOM_FRONT_CENTER` Bottom front center output channel (see BFC in channel diagram below FC) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BOTTOM_FRONT_LEFT` Bottom front left output channel (see BFL in channel diagram below FL) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_BOTTOM_FRONT_RIGHT` Bottom front right output channel (see BFR in channel diagram below FR) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_DEFAULT` Default audio channel mask |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_CENTER` Front center output channel (see FC in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_LEFT` Front left output channel (see FL in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_LEFT_OF_CENTER` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_RIGHT` Front right output channel (see FR in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_RIGHT_OF_CENTER` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_WIDE_LEFT` Front wide left output channel (see FWL in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_FRONT_WIDE_RIGHT` Front wide right output channel (see FWR in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY` LFE "low frequency effect" channel When used in conjunction with `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY_2`, it is intended to contain the left low-frequency effect signal, also referred to as "LFE1" in ITU-R BS.2159-8 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY_2` The second LFE channel When used in conjunction with `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY`, it is intended to contain the right low-frequency effect signal, also referred to as "LFE2" in ITU-R BS.2159-8 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_MONO` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_QUAD` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_SIDE_LEFT` Side left output channel (see SL in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_SIDE_RIGHT` Side right output channel (see SR in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_SURROUND` |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_BACK_CENTER` Top back center output channel (see TBC in channel diagram above BC) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_BACK_LEFT` Top back left output channel (see TBL in channel diagram above BL) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_BACK_RIGHT` Top back right output channel (see TBR in channel diagram above BR) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_CENTER` Top center (above listener) output channel (see TC in channel diagram) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_FRONT_CENTER` Top front center output channel (see TFC in channel diagram above FC) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_FRONT_LEFT` Top front left output channel (see TFL in channel diagram above FL) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_FRONT_RIGHT` Top front right output channel (see TFR in channel diagram above FR) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_SIDE_LEFT` Top side left output channel (see TSL in channel diagram above SL) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_TOP_SIDE_RIGHT` Top side right output channel (see TSR in channel diagram above SR) |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_ELD` Audio data format: AAC ELD compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_HE_V1` Audio data format: AAC HE V1 compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_HE_V2` Audio data format: AAC HE V2 compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_LC` Audio data format: AAC LC compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_XHE` Audio data format: AAC xHE compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC3` Audio data format: AC-3 compressed, also known as Dolby Digital |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC4` Audio data format: AC-4 (levels 0-3) sync frame transport format |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC4_L4` Audio data format: AC-4 level 4 sync frame transport format |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DEFAULT` Default audio data format |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DOLBY_MAT` Audio data format: Dolby MAT (Metadata-enhanced Audio Transmission) Dolby MAT bitstreams are used to transmit Dolby TrueHD, channel-based PCM, or PCM with metadata (object audio) over HDMI (e.g. Dolby Atmos content). |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DOLBY_TRUEHD` Audio data format: DOLBY TRUEHD compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DRA` Audio data format: DRA compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DSD` Audio data format: Direct Stream Digital |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS` Audio data format: DTS compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_HD` Audio data format: DTS HD compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_HD_MA` Audio data format: DTS HD Master Audio compressed DTS HD Master Audio stream is variable bit rate and contains lossless audio. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD` *This constant was deprecated in API level 34. Use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P1` instead.* |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P1` Audio data format: DTS UHD Profile-1 compressed (aka DTS:X Profile 1) Has the same meaning and value as the deprecated `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD`. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P2` Audio data format: DTS UHD Profile-2 compressed DTS-UHD Profile-2 supports delivery of Channel-Based Audio, Object-Based Audio and High Order Ambisonic presentations up to the fourth order. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3` Audio data format: E-AC-3 compressed, also known as Dolby Digital Plus or DD+ |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3_JOC` Audio data format: E-AC-3-JOC compressed E-AC-3-JOC streams can be decoded by downstream devices supporting `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3`. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_AAC` Audio data format: IAMF using the [base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in AAC. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_FLAC` Audio data format: IAMF using the [base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in FLAC. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_OPUS` Audio data format: IAMF using the [base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in OPUS. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_PCM` Audio data format: IAMF using the [base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in PCM. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_AAC` Audio data format: IAMF using the [base profile](https://aomediacodec.github.io/iamf/#profiles-base) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in AAC. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_FLAC` Audio data format: IAMF using the [base profile](https://aomediacodec.github.io/iamf/#profiles-base) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in FLAC. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_OPUS` Audio data format: IAMF using the [base profile](https://aomediacodec.github.io/iamf/#profiles-base) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in OPUS. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_PCM` Audio data format: IAMF using the [base profile](https://aomediacodec.github.io/iamf/#profiles-base) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in PCM. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_AAC` Audio data format: IAMF using the [simple profile](https://aomediacodec.github.io/iamf/#profiles-simple) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in AAC. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_FLAC` Audio data format: IAMF using the [simple profile](https://aomediacodec.github.io/iamf/#profiles-simple) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in FLAC. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_OPUS` Audio data format: IAMF using the [simple profile](https://aomediacodec.github.io/iamf/#profiles-simple) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in OPUS. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_PCM` Audio data format: IAMF using the [simple profile](https://aomediacodec.github.io/iamf/#profiles-simple) with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id) in PCM. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IEC61937` Audio data format: compressed audio wrapped in PCM for HDMI or S/PDIF passthrough. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_INVALID` Invalid audio data format |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MP3` Audio data format: MP3 compressed |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_BL_L3` Audio data format: MPEG-H baseline profile, level 3 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_BL_L4` Audio data format: MPEG-H baseline profile, level 4 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_LC_L3` Audio data format: MPEG-H low complexity profile, level 3 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_LC_L4` Audio data format: MPEG-H low complexity profile, level 4 |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_OPUS` Audio data format: OPUS compressed. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_16BIT` Audio data format: PCM 16 bit per sample. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_24BIT_PACKED` Audio data format: PCM 24 bit per sample packed as 3 bytes. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_32BIT` Audio data format: PCM 32 bit per sample. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_8BIT` Audio data format: PCM 8 bit per sample. |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_FLOAT` Audio data format: single-precision floating-point per sample |
| `int` | `https://developer.android.com/reference/android/media/AudioFormat#SAMPLE_RATE_UNSPECIFIED` Sample rate will be a route-dependent value. |

### Inherited constants

From interface `https://developer.android.com/reference/android/os/Parcelable` `int` `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR`

Descriptor bit used with `https://developer.android.com/reference/android/os/Parcelable#describeContents()`: indicates that
the Parcelable object's flattened representation includes a file descriptor.


`int` `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`

Flag for use with `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`: 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)`".


| ### Fields ||
|---|---|
| ` public static final https://developer.android.com/reference/android/os/Parcelable.Creator<https://developer.android.com/reference/android/media/AudioFormat>` | `https://developer.android.com/reference/android/media/AudioFormat#CREATOR` |

| ### Public methods ||
|---|---|
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#describeContents()() ` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| ` boolean` | ` https://developer.android.com/reference/android/media/AudioFormat#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object o) ` Indicates whether some other object is "equal to" this one. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getChannelAcnMask()() ` Return the Ambisonics channel mask. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getChannelCount()() ` Return the channel count. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getChannelIndexMask()() ` Return the channel index mask. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getChannelMask()() ` Return the channel mask. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getEncoding()() ` Return the encoding. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getFrameSizeInBytes()() ` Return the frame size in bytes. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#getSampleRate()() ` Return the sample rate. |
| ` int` | ` https://developer.android.com/reference/android/media/AudioFormat#hashCode()() ` Returns a hash code value for the object. |
| ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/android/media/AudioFormat#toString()() ` Returns a string representation of the object. |
| ` void` | ` https://developer.android.com/reference/android/media/AudioFormat#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags) ` Flatten this object in to a Parcel. |

### Inherited methods

From class `

https://developer.android.com/reference/java/lang/Object

` `


https://developer.android.com/reference/java/lang/Object` `
https://developer.android.com/reference/java/lang/Object#clone()()
`

Creates and returns a copy of this object.


`


boolean` `
https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj)
`

Indicates whether some other object is "equal to" this one.


`


void` `
https://developer.android.com/reference/java/lang/Object#finalize()()
`

Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.


`


final

https://developer.android.com/reference/java/lang/Class<?>` `
https://developer.android.com/reference/java/lang/Object#getClass()()
`

Returns the runtime class of this `Object`.


`


int` `
https://developer.android.com/reference/java/lang/Object#hashCode()()
`

Returns a hash code value for the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notify()()
`

Wakes up a single thread that is waiting on this object's
monitor.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#notifyAll()()
`

Wakes up all threads that are waiting on this object's monitor.


`


https://developer.android.com/reference/java/lang/String` `
https://developer.android.com/reference/java/lang/Object#toString()()
`

Returns a string representation of the object.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis)
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*, or until a
certain amount of real time has elapsed.


`


final

void` `
https://developer.android.com/reference/java/lang/Object#wait()()
`

Causes the current thread to wait until it is awakened, typically
by being *notified* or *interrupted*.


From interface `

https://developer.android.com/reference/android/os/Parcelable

` `
abstract


int` `
https://developer.android.com/reference/android/os/Parcelable#describeContents()()
`

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.


`
abstract


void` `
https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)(https://developer.android.com/reference/android/os/Parcel dest, int flags)
`

Flatten this object in to a Parcel.


## Constants

### CHANNEL_ACN_HORIZONTAL

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_HORIZONTAL
```

Ambisonics channel mask flag for the horizontal-only representation.

<br />

Constant Value:

512
(0x00000200)


### CHANNEL_ACN_ORDER_0

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_0
```

Ambisonics channel mask for order 0.

<br />

Constant Value:

1
(0x00000001)


### CHANNEL_ACN_ORDER_0_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_0_HRZ
```

Ambisonics horizontal-only channel mask for order 0.

<br />

Constant Value:

513
(0x00000201)


### CHANNEL_ACN_ORDER_1

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_1
```

Ambisonics channel mask for order 1.

<br />

Constant Value:

4
(0x00000004)


### CHANNEL_ACN_ORDER_10

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_10
```

Ambisonics channel mask for order 10.

<br />

Constant Value:

121
(0x00000079)


### CHANNEL_ACN_ORDER_10_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_10_HRZ
```

Ambisonics horizontal-only channel mask for order 10.

<br />

Constant Value:

533
(0x00000215)


### CHANNEL_ACN_ORDER_11

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_11
```

Ambisonics channel mask for order 11.

<br />

Constant Value:

144
(0x00000090)


### CHANNEL_ACN_ORDER_11_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_11_HRZ
```

Ambisonics horizontal-only channel mask for order 11.

<br />

Constant Value:

535
(0x00000217)


### CHANNEL_ACN_ORDER_12

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_12
```

Ambisonics channel mask for order 12.

<br />

Constant Value:

169
(0x000000a9)


### CHANNEL_ACN_ORDER_12_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_12_HRZ
```

Ambisonics horizontal-only channel mask for order 12.

<br />

Constant Value:

537
(0x00000219)


### CHANNEL_ACN_ORDER_13

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_13
```

Ambisonics channel mask for order 13.

<br />

Constant Value:

196
(0x000000c4)


### CHANNEL_ACN_ORDER_13_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_13_HRZ
```

Ambisonics horizontal-only channel mask for order 13.

<br />

Constant Value:

539
(0x0000021b)


### CHANNEL_ACN_ORDER_14

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_14
```

Ambisonics channel mask for order 14.

<br />

Constant Value:

225
(0x000000e1)


### CHANNEL_ACN_ORDER_14_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_14_HRZ
```

Ambisonics horizontal-only channel mask for order 14.

<br />

Constant Value:

541
(0x0000021d)


### CHANNEL_ACN_ORDER_1_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_1_HRZ
```

Ambisonics horizontal-only channel mask for order 1.

<br />

Constant Value:

515
(0x00000203)


### CHANNEL_ACN_ORDER_2

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_2
```

Ambisonics channel mask for order 2.

<br />

Constant Value:

9
(0x00000009)


### CHANNEL_ACN_ORDER_2_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_2_HRZ
```

Ambisonics horizontal-only channel mask for order 2.

<br />

Constant Value:

517
(0x00000205)


### CHANNEL_ACN_ORDER_3

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_3
```

Ambisonics channel mask for order 3.

<br />

Constant Value:

16
(0x00000010)


### CHANNEL_ACN_ORDER_3_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_3_HRZ
```

Ambisonics horizontal-only channel mask for order 3.

<br />

Constant Value:

519
(0x00000207)


### CHANNEL_ACN_ORDER_4

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_4
```

Ambisonics channel mask for order 4.

<br />

Constant Value:

25
(0x00000019)


### CHANNEL_ACN_ORDER_4_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_4_HRZ
```

Ambisonics horizontal-only channel mask for order 4.

<br />

Constant Value:

521
(0x00000209)


### CHANNEL_ACN_ORDER_5

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_5
```

Ambisonics channel mask for order 5.

<br />

Constant Value:

36
(0x00000024)


### CHANNEL_ACN_ORDER_5_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_5_HRZ
```

Ambisonics horizontal-only channel mask for order 5.

<br />

Constant Value:

523
(0x0000020b)


### CHANNEL_ACN_ORDER_6

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_6
```

Ambisonics channel mask for order 6.

<br />

Constant Value:

49
(0x00000031)


### CHANNEL_ACN_ORDER_6_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_6_HRZ
```

Ambisonics horizontal-only channel mask for order 6.

<br />

Constant Value:

525
(0x0000020d)


### CHANNEL_ACN_ORDER_7

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_7
```

Ambisonics channel mask for order 7.

<br />

Constant Value:

64
(0x00000040)


### CHANNEL_ACN_ORDER_7_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_7_HRZ
```

Ambisonics horizontal-only channel mask for order 7.

<br />

Constant Value:

527
(0x0000020f)


### CHANNEL_ACN_ORDER_8

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_8
```

Ambisonics channel mask for order 8.

<br />

Constant Value:

81
(0x00000051)


### CHANNEL_ACN_ORDER_8_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_8_HRZ
```

Ambisonics horizontal-only channel mask for order 8.

<br />

Constant Value:

529
(0x00000211)


### CHANNEL_ACN_ORDER_9

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_9
```

Ambisonics channel mask for order 9.

<br />

Constant Value:

100
(0x00000064)


### CHANNEL_ACN_ORDER_9_HRZ

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_ACN_ORDER_9_HRZ
```

Ambisonics horizontal-only channel mask for order 9.

<br />

Constant Value:

531
(0x00000213)


### CHANNEL_CONFIGURATION_DEFAULT

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_CONFIGURATION_DEFAULT
```


**This constant was deprecated
in API level 15.**   

Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_DEFAULT` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_DEFAULT` instead.

<br />

<br />

Constant Value:

1
(0x00000001)


### CHANNEL_CONFIGURATION_INVALID

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_CONFIGURATION_INVALID
```


**This constant was deprecated
in API level 15.**   

Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` instead.

<br />

<br />

Constant Value:

0
(0x00000000)


### CHANNEL_CONFIGURATION_MONO

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_CONFIGURATION_MONO
```


**This constant was deprecated
in API level 15.**   

Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_MONO` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_MONO` instead.

<br />

<br />

Constant Value:

2
(0x00000002)


### CHANNEL_CONFIGURATION_STEREO

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_CONFIGURATION_STEREO
```


**This constant was deprecated
in API level 15.**   

Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_IN_STEREO` instead.

<br />

<br />

Constant Value:

3
(0x00000003)


### CHANNEL_INVALID

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_INVALID
```

Invalid audio channel mask

<br />

Constant Value:

0
(0x00000000)


### CHANNEL_IN_BACK

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_BACK
```

<br />

<br />

Constant Value:

32
(0x00000020)


### CHANNEL_IN_BACK_PROCESSED

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_BACK_PROCESSED
```

<br />

<br />

Constant Value:

512
(0x00000200)


### CHANNEL_IN_DEFAULT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_DEFAULT
```

<br />

<br />

Constant Value:

1
(0x00000001)


### CHANNEL_IN_FRONT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_FRONT
```

<br />

<br />

Constant Value:

16
(0x00000010)


### CHANNEL_IN_FRONT_PROCESSED

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_FRONT_PROCESSED
```

<br />

<br />

Constant Value:

256
(0x00000100)


### CHANNEL_IN_LEFT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_LEFT
```

<br />

<br />

Constant Value:

4
(0x00000004)


### CHANNEL_IN_LEFT_PROCESSED

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_LEFT_PROCESSED
```

<br />

<br />

Constant Value:

64
(0x00000040)


### CHANNEL_IN_MONO

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_MONO
```

<br />

<br />

Constant Value:

16
(0x00000010)


### CHANNEL_IN_PRESSURE

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_PRESSURE
```

<br />

<br />

Constant Value:

1024
(0x00000400)


### CHANNEL_IN_RIGHT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_RIGHT
```

<br />

<br />

Constant Value:

8
(0x00000008)


### CHANNEL_IN_RIGHT_PROCESSED

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_RIGHT_PROCESSED
```

<br />

<br />

Constant Value:

128
(0x00000080)


### CHANNEL_IN_STEREO

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_STEREO
```

<br />

<br />

Constant Value:

12
(0x0000000c)


### CHANNEL_IN_VOICE_DNLINK

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_VOICE_DNLINK
```

<br />

<br />

Constant Value:

32768
(0x00008000)


### CHANNEL_IN_VOICE_UPLINK

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_VOICE_UPLINK
```

<br />

<br />

Constant Value:

16384
(0x00004000)


### CHANNEL_IN_X_AXIS

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_X_AXIS
```

<br />

<br />

Constant Value:

2048
(0x00000800)


### CHANNEL_IN_Y_AXIS

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_Y_AXIS
```

<br />

<br />

Constant Value:

4096
(0x00001000)


### CHANNEL_IN_Z_AXIS

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_IN_Z_AXIS
```

<br />

<br />

Constant Value:

8192
(0x00002000)


### CHANNEL_OUT_13POINT0

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_13POINT0
```

Output channel mask for 13.0

<br />

Constant Value:

30136348
(0x01cbd81c)


### CHANNEL_OUT_5POINT1

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_5POINT1
```

Output channel mask for 5.1

<br />

Constant Value:

252
(0x000000fc)


### CHANNEL_OUT_5POINT1POINT2

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_5POINT1POINT2
```

Output channel mask for 5.1.2
Same as 5.1 with the addition of left and right top channels

<br />

Constant Value:

3145980
(0x003000fc)


### CHANNEL_OUT_5POINT1POINT4

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_5POINT1POINT4
```

Output channel mask for 5.1.4
Same as 5.1 with the addition of four top channels

<br />

Constant Value:

737532
(0x000b40fc)


### CHANNEL_OUT_6POINT1

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_6POINT1
```

Output channel mask for 6.1
Same as 5.1 with the addition of the back center channel

<br />

Constant Value:

1276
(0x000004fc)


### CHANNEL_OUT_7POINT1

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_7POINT1
```


**This constant was deprecated
in API level 23.**   

Not the typical 7.1 surround configuration. Use `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_7POINT1_SURROUND` instead.

<br />

<br />

Constant Value:

1020
(0x000003fc)


### CHANNEL_OUT_7POINT1POINT2

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_7POINT1POINT2
```

Output channel mask for 7.1.2
Same as 7.1 with the addition of left and right top channels

<br />

Constant Value:

3152124
(0x003018fc)


### CHANNEL_OUT_7POINT1POINT4

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_7POINT1POINT4
```

Output channel mask for 7.1.4
Same as 7.1 with the addition of four top channels

<br />

Constant Value:

743676
(0x000b58fc)


### CHANNEL_OUT_7POINT1_SURROUND

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_7POINT1_SURROUND
```

Output channel mask for 7.1

<br />

Constant Value:

6396
(0x000018fc)


### CHANNEL_OUT_9POINT1POINT4

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_9POINT1POINT4
```

Output channel mask for 9.1.4
Same as 7.1.4 with the addition of left and right front wide channels

<br />

Constant Value:

202070268
(0x0c0b58fc)


### CHANNEL_OUT_9POINT1POINT6

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_9POINT1POINT6
```

Output channel mask for 9.1.6
Same as 9.1.4 with the addition of left and right top side channels

<br />

Constant Value:

205215996
(0x0c3b58fc)


### CHANNEL_OUT_BACK_CENTER

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_BACK_CENTER
```

Back center output channel (see BC in channel diagram)

<br />

Constant Value:

1024
(0x00000400)


### CHANNEL_OUT_BACK_LEFT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_BACK_LEFT
```

Back left output channel (see BL in channel diagram)

<br />

Constant Value:

64
(0x00000040)


### CHANNEL_OUT_BACK_RIGHT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_BACK_RIGHT
```

Back right output channel (see BR in channel diagram)

<br />

Constant Value:

128
(0x00000080)


### CHANNEL_OUT_BOTTOM_FRONT_CENTER

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_BOTTOM_FRONT_CENTER
```

Bottom front center output channel (see BFC in channel diagram below FC)

<br />

Constant Value:

8388608
(0x00800000)


### CHANNEL_OUT_BOTTOM_FRONT_LEFT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_BOTTOM_FRONT_LEFT
```

Bottom front left output channel (see BFL in channel diagram below FL)

<br />

Constant Value:

4194304
(0x00400000)


### CHANNEL_OUT_BOTTOM_FRONT_RIGHT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_BOTTOM_FRONT_RIGHT
```

Bottom front right output channel (see BFR in channel diagram below FR)

<br />

Constant Value:

16777216
(0x01000000)


### CHANNEL_OUT_DEFAULT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_DEFAULT
```

Default audio channel mask

<br />

Constant Value:

1
(0x00000001)


### CHANNEL_OUT_FRONT_CENTER

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_CENTER
```

Front center output channel (see FC in channel diagram)

<br />

Constant Value:

16
(0x00000010)


### CHANNEL_OUT_FRONT_LEFT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_LEFT
```

Front left output channel (see FL in channel diagram)

<br />

Constant Value:

4
(0x00000004)


### CHANNEL_OUT_FRONT_LEFT_OF_CENTER

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_LEFT_OF_CENTER
```

<br />

<br />

Constant Value:

256
(0x00000100)


### CHANNEL_OUT_FRONT_RIGHT

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_RIGHT
```

Front right output channel (see FR in channel diagram)

<br />

Constant Value:

8
(0x00000008)


### CHANNEL_OUT_FRONT_RIGHT_OF_CENTER

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_RIGHT_OF_CENTER
```

<br />

<br />

Constant Value:

512
(0x00000200)


### CHANNEL_OUT_FRONT_WIDE_LEFT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_WIDE_LEFT
```

Front wide left output channel (see FWL in channel diagram)

<br />

Constant Value:

67108864
(0x04000000)


### CHANNEL_OUT_FRONT_WIDE_RIGHT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_FRONT_WIDE_RIGHT
```

Front wide right output channel (see FWR in channel diagram)

<br />

Constant Value:

134217728
(0x08000000)


### CHANNEL_OUT_LOW_FREQUENCY

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_LOW_FREQUENCY
```

LFE "low frequency effect" channel
When used in conjunction with `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY_2`, it is intended
to contain the left low-frequency effect signal, also referred to as "LFE1"
in ITU-R BS.2159-8

<br />

Constant Value:

32
(0x00000020)


### CHANNEL_OUT_LOW_FREQUENCY_2

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_LOW_FREQUENCY_2
```

The second LFE channel
When used in conjunction with `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_LOW_FREQUENCY`, it is intended
to contain the right low-frequency effect signal, also referred to as "LFE2"
in ITU-R BS.2159-8

<br />

Constant Value:

33554432
(0x02000000)


### CHANNEL_OUT_MONO

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_MONO
```

<br />

<br />

Constant Value:

4
(0x00000004)


### CHANNEL_OUT_QUAD

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_QUAD
```

<br />

<br />

Constant Value:

204
(0x000000cc)


### CHANNEL_OUT_SIDE_LEFT

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_SIDE_LEFT
```

Side left output channel (see SL in channel diagram)

<br />

Constant Value:

2048
(0x00000800)


### CHANNEL_OUT_SIDE_RIGHT

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_SIDE_RIGHT
```

Side right output channel (see SR in channel diagram)

<br />

Constant Value:

4096
(0x00001000)


### CHANNEL_OUT_STEREO

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_STEREO
```

<br />

<br />

Constant Value:

12
(0x0000000c)


### CHANNEL_OUT_SURROUND

Added in [API level 5](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_SURROUND
```

<br />

<br />

Constant Value:

1052
(0x0000041c)


### CHANNEL_OUT_TOP_BACK_CENTER

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_BACK_CENTER
```

Top back center output channel (see TBC in channel diagram above BC)

<br />

Constant Value:

262144
(0x00040000)


### CHANNEL_OUT_TOP_BACK_LEFT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_BACK_LEFT
```

Top back left output channel (see TBL in channel diagram above BL)

<br />

Constant Value:

131072
(0x00020000)


### CHANNEL_OUT_TOP_BACK_RIGHT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_BACK_RIGHT
```

Top back right output channel (see TBR in channel diagram above BR)

<br />

Constant Value:

524288
(0x00080000)


### CHANNEL_OUT_TOP_CENTER

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_CENTER
```

Top center (above listener) output channel (see TC in channel diagram)

<br />

Constant Value:

8192
(0x00002000)


### CHANNEL_OUT_TOP_FRONT_CENTER

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_FRONT_CENTER
```

Top front center output channel (see TFC in channel diagram above FC)

<br />

Constant Value:

32768
(0x00008000)


### CHANNEL_OUT_TOP_FRONT_LEFT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_FRONT_LEFT
```

Top front left output channel (see TFL in channel diagram above FL)

<br />

Constant Value:

16384
(0x00004000)


### CHANNEL_OUT_TOP_FRONT_RIGHT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_FRONT_RIGHT
```

Top front right output channel (see TFR in channel diagram above FR)

<br />

Constant Value:

65536
(0x00010000)


### CHANNEL_OUT_TOP_SIDE_LEFT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_SIDE_LEFT
```

Top side left output channel (see TSL in channel diagram above SL)

<br />

Constant Value:

1048576
(0x00100000)


### CHANNEL_OUT_TOP_SIDE_RIGHT

Added in [API level 32](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int CHANNEL_OUT_TOP_SIDE_RIGHT
```

Top side right output channel (see TSR in channel diagram above SR)

<br />

Constant Value:

2097152
(0x00200000)


### ENCODING_AAC_ELD

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AAC_ELD
```

Audio data format: AAC ELD compressed

<br />

Constant Value:

15
(0x0000000f)


### ENCODING_AAC_HE_V1

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AAC_HE_V1
```

Audio data format: AAC HE V1 compressed

<br />

Constant Value:

11
(0x0000000b)


### ENCODING_AAC_HE_V2

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AAC_HE_V2
```

Audio data format: AAC HE V2 compressed

<br />

Constant Value:

12
(0x0000000c)


### ENCODING_AAC_LC

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AAC_LC
```

Audio data format: AAC LC compressed

<br />

Constant Value:

10
(0x0000000a)


### ENCODING_AAC_XHE

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AAC_XHE
```

Audio data format: AAC xHE compressed

<br />

Constant Value:

16
(0x00000010)


### ENCODING_AC3

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AC3
```

Audio data format: AC-3 compressed, also known as Dolby Digital

<br />

Constant Value:

5
(0x00000005)


### ENCODING_AC4

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_AC4
```

Audio data format: AC-4 (levels 0-3) sync frame transport format

<br />

Constant Value:

17
(0x00000011)


### ENCODING_AC4_L4

Added in [version 37.2](https://developer.android.com/topic/libraries/support-library/revisions)

```
public static final int ENCODING_AC4_L4
```

Audio data format: AC-4 level 4 sync frame transport format

<br />

Constant Value:

32
(0x00000020)


### ENCODING_DEFAULT

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DEFAULT
```

Default audio data format

<br />

Constant Value:

1
(0x00000001)


### ENCODING_DOLBY_MAT

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DOLBY_MAT
```

Audio data format: Dolby MAT (Metadata-enhanced Audio Transmission)
Dolby MAT bitstreams are used to transmit Dolby TrueHD, channel-based PCM, or PCM with
metadata (object audio) over HDMI (e.g. Dolby Atmos content).

<br />

Constant Value:

19
(0x00000013)


### ENCODING_DOLBY_TRUEHD

Added in [API level 25](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DOLBY_TRUEHD
```

Audio data format: DOLBY TRUEHD compressed

<br />

Constant Value:

14
(0x0000000e)


### ENCODING_DRA

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DRA
```

Audio data format: DRA compressed

<br />

Constant Value:

28
(0x0000001c)


### ENCODING_DSD

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DSD
```

Audio data format: Direct Stream Digital

<br />

Constant Value:

31
(0x0000001f)


### ENCODING_DTS

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DTS
```

Audio data format: DTS compressed

<br />

Constant Value:

7
(0x00000007)


### ENCODING_DTS_HD

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DTS_HD
```

Audio data format: DTS HD compressed

<br />

Constant Value:

8
(0x00000008)


### ENCODING_DTS_HD_MA

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DTS_HD_MA
```

Audio data format: DTS HD Master Audio compressed
DTS HD Master Audio stream is variable bit rate and contains lossless audio.
Use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_HD_MA` for lossless audio content (DTS-HD MA Lossless)
and use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_HD` for other DTS bitstreams with extension substream
(DTS 8Ch Discrete, DTS Hi Res, DTS Express).

<br />

Constant Value:

29
(0x0000001d)


### ENCODING_DTS_UHD

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DTS_UHD
```


**This constant was deprecated
in API level 34.**   

Use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P1` instead.

Audio data format: DTS UHD Profile-1 compressed (aka DTS:X Profile 1)
Has the same meaning and value as ENCODING_DTS_UHD_P1.

<br />

Constant Value:

27
(0x0000001b)


### ENCODING_DTS_UHD_P1

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DTS_UHD_P1
```

Audio data format: DTS UHD Profile-1 compressed (aka DTS:X Profile 1)
Has the same meaning and value as the deprecated `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD`.

<br />

Constant Value:

27
(0x0000001b)


### ENCODING_DTS_UHD_P2

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_DTS_UHD_P2
```

Audio data format: DTS UHD Profile-2 compressed
DTS-UHD Profile-2 supports delivery of Channel-Based Audio, Object-Based Audio
and High Order Ambisonic presentations up to the fourth order.
Use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P1` to transmit DTS UHD Profile 1 (aka DTS:X Profile 1)
bitstream.
Use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P2` to transmit DTS UHD Profile 2 (aka DTS:X Profile 2)
bitstream.

<br />

Constant Value:

30
(0x0000001e)


### ENCODING_E_AC3

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_E_AC3
```

Audio data format: E-AC-3 compressed, also known as Dolby Digital Plus or DD+

<br />

Constant Value:

6
(0x00000006)


### ENCODING_E_AC3_JOC

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_E_AC3_JOC
```

Audio data format: E-AC-3-JOC compressed
E-AC-3-JOC streams can be decoded by downstream devices supporting `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3`.
Use `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3` as the AudioTrack encoding when the downstream device
supports `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3` but not `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3_JOC`.

<br />

Constant Value:

18
(0x00000012)


### ENCODING_IAMF_BASE_ENHANCED_PROFILE_AAC

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_ENHANCED_PROFILE_AAC
```

Audio data format: IAMF using the
[base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in AAC.

<br />

Constant Value:

42
(0x0000002a)


### ENCODING_IAMF_BASE_ENHANCED_PROFILE_FLAC

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_ENHANCED_PROFILE_FLAC
```

Audio data format: IAMF using the
[base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in FLAC.

<br />

Constant Value:

43
(0x0000002b)


### ENCODING_IAMF_BASE_ENHANCED_PROFILE_OPUS

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_ENHANCED_PROFILE_OPUS
```

Audio data format: IAMF using the
[base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in OPUS.

<br />

Constant Value:

41
(0x00000029)


### ENCODING_IAMF_BASE_ENHANCED_PROFILE_PCM

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_ENHANCED_PROFILE_PCM
```

Audio data format: IAMF using the
[base-enhanced profile](https://aomediacodec.github.io/iamf/#profiles-base-enhanced)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in PCM.

<br />

Constant Value:

44
(0x0000002c)


### ENCODING_IAMF_BASE_PROFILE_AAC

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_PROFILE_AAC
```

Audio data format: IAMF using the
[base profile](https://aomediacodec.github.io/iamf/#profiles-base)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in AAC.

<br />

Constant Value:

38
(0x00000026)


### ENCODING_IAMF_BASE_PROFILE_FLAC

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_PROFILE_FLAC
```

Audio data format: IAMF using the
[base profile](https://aomediacodec.github.io/iamf/#profiles-base)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in FLAC.

<br />

Constant Value:

39
(0x00000027)


### ENCODING_IAMF_BASE_PROFILE_OPUS

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_PROFILE_OPUS
```

Audio data format: IAMF using the
[base profile](https://aomediacodec.github.io/iamf/#profiles-base)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in OPUS.

<br />

Constant Value:

37
(0x00000025)


### ENCODING_IAMF_BASE_PROFILE_PCM

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_BASE_PROFILE_PCM
```

Audio data format: IAMF using the
[base profile](https://aomediacodec.github.io/iamf/#profiles-base)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in PCM.

<br />

Constant Value:

40
(0x00000028)


### ENCODING_IAMF_SIMPLE_PROFILE_AAC

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_SIMPLE_PROFILE_AAC
```

Audio data format: IAMF using the
[simple profile](https://aomediacodec.github.io/iamf/#profiles-simple)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in AAC.

<br />

Constant Value:

34
(0x00000022)


### ENCODING_IAMF_SIMPLE_PROFILE_FLAC

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_SIMPLE_PROFILE_FLAC
```

Audio data format: IAMF using the
[simple profile](https://aomediacodec.github.io/iamf/#profiles-simple)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in FLAC.

<br />

Constant Value:

35
(0x00000023)


### ENCODING_IAMF_SIMPLE_PROFILE_OPUS

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_SIMPLE_PROFILE_OPUS
```

Audio data format: IAMF using the
[simple profile](https://aomediacodec.github.io/iamf/#profiles-simple)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in OPUS.

<br />

Constant Value:

33
(0x00000021)


### ENCODING_IAMF_SIMPLE_PROFILE_PCM

Added in [API level 36](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IAMF_SIMPLE_PROFILE_PCM
```

Audio data format: IAMF using the
[simple profile](https://aomediacodec.github.io/iamf/#profiles-simple)
with audio streams [encoded](https://aomediacodec.github.io/iamf/#codec_id)
in PCM.

<br />

Constant Value:

36
(0x00000024)


### ENCODING_IEC61937

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_IEC61937
```

Audio data format: compressed audio wrapped in PCM for HDMI
or S/PDIF passthrough.
For devices whose SDK version is less than `https://developer.android.com/reference/android/os/Build.VERSION_CODES#S`, the
channel mask of IEC61937 track must be `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_OUT_STEREO`.
Data should be written to the stream in a short\[\] array.
If the data is written in a byte\[\] array then there may be endian problems
on some platforms when converting to short internally.

<br />

Constant Value:

13
(0x0000000d)


### ENCODING_INVALID

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_INVALID
```

Invalid audio data format

<br />

Constant Value:

0
(0x00000000)


### ENCODING_MP3

Added in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_MP3
```

Audio data format: MP3 compressed

<br />

Constant Value:

9
(0x00000009)


### ENCODING_MPEGH_BL_L3

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_MPEGH_BL_L3
```

Audio data format: MPEG-H baseline profile, level 3

<br />

Constant Value:

23
(0x00000017)


### ENCODING_MPEGH_BL_L4

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_MPEGH_BL_L4
```

Audio data format: MPEG-H baseline profile, level 4

<br />

Constant Value:

24
(0x00000018)


### ENCODING_MPEGH_LC_L3

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_MPEGH_LC_L3
```

Audio data format: MPEG-H low complexity profile, level 3

<br />

Constant Value:

25
(0x00000019)


### ENCODING_MPEGH_LC_L4

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_MPEGH_LC_L4
```

Audio data format: MPEG-H low complexity profile, level 4

<br />

Constant Value:

26
(0x0000001a)


### ENCODING_OPUS

Added in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_OPUS
```

Audio data format: OPUS compressed.

<br />

Constant Value:

20
(0x00000014)


### ENCODING_PCM_16BIT

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_PCM_16BIT
```

Audio data format: PCM 16 bit per sample. Guaranteed to be supported by devices.

<br />

Constant Value:

2
(0x00000002)


### ENCODING_PCM_24BIT_PACKED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_PCM_24BIT_PACKED
```

Audio data format: PCM 24 bit per sample packed as 3 bytes.

The bytes are in little-endian order, so the least significant byte
comes first in the byte array.

Not guaranteed to be supported by devices, may be emulated if not supported.

<br />

Constant Value:

21
(0x00000015)


### ENCODING_PCM_32BIT

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_PCM_32BIT
```

Audio data format: PCM 32 bit per sample.
Not guaranteed to be supported by devices, may be emulated if not supported.

<br />

Constant Value:

22
(0x00000016)


### ENCODING_PCM_8BIT

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_PCM_8BIT
```

Audio data format: PCM 8 bit per sample. Not guaranteed to be supported by devices.

<br />

Constant Value:

3
(0x00000003)


### ENCODING_PCM_FLOAT

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ENCODING_PCM_FLOAT
```

Audio data format: single-precision floating-point per sample

<br />

Constant Value:

4
(0x00000004)


### SAMPLE_RATE_UNSPECIFIED

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SAMPLE_RATE_UNSPECIFIED
```

Sample rate will be a route-dependent value.
For AudioTrack, it is usually the sink sample rate,
and for AudioRecord it is usually the source sample rate.

<br />

Constant Value:

0
(0x00000000)


## Fields

### CREATOR

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final Creator<AudioFormat> CREATOR
```

<br />

<br />

## Public methods

### describeContents

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int describeContents ()
```

Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation. For example, if the object will
include a file descriptor in the output of `https://developer.android.com/reference/android/os/Parcelable#writeToParcel(android.os.Parcel,%20int)`,
the return value of this method must include the
`https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` bit.

<br />

| Returns ||
|---|---|
| `int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `https://developer.android.com/reference/android/os/Parcelable#CONTENTS_FILE_DESCRIPTOR` |

### equals

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean equals (Object o)
```

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 return `true`.
- It is *symmetric*: for any non-null reference values `x` and `y`, `x.equals(y)` should return `true` if and only if `y.equals(x)` returns `true`.
- It is *transitive*: for any non-null reference values `x`, `y`, and `z`, if `x.equals(y)` returns `true` and `y.equals(z)` returns `true`, then `x.equals(z)` should return `true`.
- It is *consistent*: for any non-null reference values `x` and `y`, multiple invocations of `x.equals(y)` consistently return `true` or consistently return `false`, provided no information used in `equals` comparisons on the objects is modified.
- For any non-null reference value `x`, `x.equals(null)` should return `false`.


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.

<br />

| Parameters ||
|---|---|
| `o` | `Object`: the reference object with which to compare. <br /> |

| Returns ||
|---|---|
| `boolean` | `true` if this object is the same as the obj argument; `false` otherwise. <br /> |

### getChannelAcnMask

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChannelAcnMask ()
```

Return the Ambisonics channel mask.
See the section on [Ambisonics channel masks](https://developer.android.com/reference/android/media/AudioFormat#channelAcnMask) for more
information.

<br />

| Returns ||
|---|---|
| `int` | one of the values that can be set in `https://developer.android.com/reference/android/media/AudioFormat.Builder#setChannelAcnMask(int)` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` if not set or an invalid mask was used. <br /> |

### getChannelCount

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChannelCount ()
```

Return the channel count.

<br />

| Returns ||
|---|---|
| `int` | the channel count derived from the channel position mask or the channel index mask. Zero is returned if both the channel position mask and the channel index mask are not set. <br /> |

### getChannelIndexMask

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChannelIndexMask ()
```

Return the channel index mask.
See the section on [channel masks](https://developer.android.com/reference/android/media/AudioFormat#channelMask) for more information about
the difference between index-based masks, and position-based masks (as returned
by `https://developer.android.com/reference/android/media/AudioFormat#getChannelMask()`).

<br />

| Returns ||
|---|---|
| `int` | one of the values that can be set in `https://developer.android.com/reference/android/media/AudioFormat.Builder#setChannelIndexMask(int)` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` if not set or an invalid mask was used. <br /> |

### getChannelMask

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getChannelMask ()
```

Return the channel mask.
See the section on [channel masks](https://developer.android.com/reference/android/media/AudioFormat#channelMask) for more information about
the difference between index-based masks(as returned by `https://developer.android.com/reference/android/media/AudioFormat#getChannelIndexMask()`) and
the position-based mask returned by this function.

<br />

| Returns ||
|---|---|
| `int` | one of the values that can be set in `https://developer.android.com/reference/android/media/AudioFormat.Builder#setChannelMask(int)` or `https://developer.android.com/reference/android/media/AudioFormat#CHANNEL_INVALID` if not set. <br /> |

### getEncoding

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getEncoding ()
```

Return the encoding.
See the section on [encodings](https://developer.android.com/reference/android/media/AudioFormat#encoding) for more information about the different
types of supported audio encoding.

<br />

| Returns ||
|---|---|
| `int` | one of the values that can be set in `https://developer.android.com/reference/android/media/AudioFormat.Builder#setEncoding(int)` or `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_INVALID` if not set. Value is one of the following: - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_INVALID` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DEFAULT` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_16BIT` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_8BIT` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_FLOAT` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC3` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_HD` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MP3` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_LC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_HE_V1` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_HE_V2` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IEC61937` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DOLBY_TRUEHD` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_ELD` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AAC_XHE` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC4` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_AC4_L4` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_E_AC3_JOC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DOLBY_MAT` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_OPUS` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_24BIT_PACKED` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_PCM_32BIT` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_BL_L3` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_BL_L4` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_LC_L3` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_MPEGH_LC_L4` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P1` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DRA` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_HD_MA` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DTS_UHD_P2` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_DSD` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_AAC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_FLAC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_OPUS` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_ENHANCED_PROFILE_PCM` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_AAC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_FLAC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_OPUS` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_BASE_PROFILE_PCM` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_AAC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_FLAC` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_OPUS` - `https://developer.android.com/reference/android/media/AudioFormat#ENCODING_IAMF_SIMPLE_PROFILE_PCM` |

### getFrameSizeInBytes

Added in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getFrameSizeInBytes ()
```

Return the frame size in bytes.

For PCM or PCM packed compressed data this is the size of a sample multiplied
by the channel count. For all other cases, including invalid/unset channel masks,
this will return 1 byte.
As an example, a stereo 16-bit PCM format would have a frame size of 4 bytes,
an 8 channel float PCM format would have a frame size of 32 bytes,
and a compressed data format (not packed in PCM) would have a frame size of 1 byte.

Both `https://developer.android.com/reference/android/media/AudioRecord` or `https://developer.android.com/reference/android/media/AudioTrack` process data in multiples of
this frame size.

<br />

| Returns ||
|---|---|
| `int` | The audio frame size in bytes corresponding to the encoding and the channel mask. Value is 1 or greater <br /> |

### getSampleRate

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int getSampleRate ()
```

Return the sample rate.

<br />

| Returns ||
|---|---|
| `int` | one of the values that can be set in `https://developer.android.com/reference/android/media/AudioFormat.Builder#setSampleRate(int)` or `https://developer.android.com/reference/android/media/AudioFormat#SAMPLE_RATE_UNSPECIFIED` if not set. <br /> |

### hashCode

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public int hashCode ()
```

Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
`https://developer.android.com/reference/java/util/HashMap`.


The general contract of `hashCode` is:

- Whenever it is invoked on the same object more than once during an execution of a Java application, the `hashCode` method must consistently return the same integer, provided no information used in `equals` comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
- If two objects are equal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce the same integer result.
- It is *not* required that if two objects are unequal according to the `https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)` method, then calling the `hashCode` method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.

<br />

<br />

| Returns ||
|---|---|
| `int` | a hash code value for this object. <br /> |

### toString

Added in [API level 3](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public String toString ()
```

Returns a string representation of the object.

<br />

| Returns ||
|---|---|
| `https://developer.android.com/reference/java/lang/String` | a string representation of the object. <br /> |

### writeToParcel

Added in [API level 24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void writeToParcel (Parcel dest, 
                int flags)
```

Flatten this object in to a Parcel.

<br />

| Parameters ||
|---|---|
| `dest` | `Parcel`: The Parcel in which the object should be written. This value cannot be `null`. <br /> |
| `flags` | `int`: Additional flags about how the object should be written. May be 0 or `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `https://developer.android.com/reference/android/os/Parcelable#PARCELABLE_WRITE_RETURN_VALUE` |