# MediaRecorder.AudioEncoder

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Constants](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#constants)\|[Inherited Methods](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#inhmethods)  

# MediaRecorder.AudioEncoder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioEncoder "View this page in Kotlin")\|Java

`
public

final

class
MediaRecorder.AudioEncoder
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

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

<br />

*** ** * ** ***

Defines the audio encoding. These constants are used with[MediaRecorder.setAudioEncoder(int)](https://developer.android.com/reference/android/media/MediaRecorder#setAudioEncoder(int)).

## Summary

|                                                                      ### Constants                                                                      ||
|-------|--------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [AAC](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#AAC) AAC Low Complexity (AAC-LC) audio codec              |
| `int` | [AAC_ELD](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#AAC_ELD) Enhanced Low Delay AAC (AAC-ELD) audio codec |
| `int` | [AMR_NB](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#AMR_NB) AMR (Narrowband) audio codec                   |
| `int` | [AMR_WB](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#AMR_WB) AMR (Wideband) audio codec                     |
| `int` | [DEFAULT](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#DEFAULT) <br />                                       |
| `int` | [HE_AAC](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#HE_AAC) High Efficiency AAC (HE-AAC) audio codec       |
| `int` | [OPUS](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#OPUS) Opus audio codec                                   |
| `int` | [VORBIS](https://developer.android.com/reference/android/media/MediaRecorder.AudioEncoder#VORBIS) Ogg Vorbis audio codec (Support is optional)   |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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`                                                                  | ` `[wait](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*.                                                                                             | ||

## Constants

### AAC

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

```
public static final int AAC
```

AAC Low Complexity (AAC-LC) audio codec

<br />

Constant Value: 3 (0x00000003)  

### AAC_ELD

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

```
public static final int AAC_ELD
```

Enhanced Low Delay AAC (AAC-ELD) audio codec

<br />

Constant Value: 5 (0x00000005)  

### AMR_NB

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

```
public static final int AMR_NB
```

AMR (Narrowband) audio codec

<br />

Constant Value: 1 (0x00000001)  

### AMR_WB

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

```
public static final int AMR_WB
```

AMR (Wideband) audio codec

<br />

Constant Value: 2 (0x00000002)  

### DEFAULT

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

```
public static final int DEFAULT
```

<br />

<br />

Constant Value: 0 (0x00000000)  

### HE_AAC

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

```
public static final int HE_AAC
```

High Efficiency AAC (HE-AAC) audio codec

<br />

Constant Value: 4 (0x00000004)  

### OPUS

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

```
public static final int OPUS
```

Opus audio codec

<br />

Constant Value: 7 (0x00000007)  

### VORBIS

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

```
public static final int VORBIS
```

Ogg Vorbis audio codec (Support is optional)

<br />

Constant Value: 6 (0x00000006)