# MediaRecorder.AudioEncoder

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

# AudioEncoder

*** ** * ** ***

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

```
class AudioEncoder
```

|---|--------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                       ||
| ↳ | [android.media.MediaRecorder.AudioEncoder](https://developer.android.com/reference/kotlin/android/media/MediaRecorder.AudioEncoder#) |

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

## Summary

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

## Constants

### AAC

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

```
static val AAC: Int
```

AAC Low Complexity (AAC-LC) audio codec  

    Value: 3

### AAC_ELD

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

```
static val AAC_ELD: Int
```

Enhanced Low Delay AAC (AAC-ELD) audio codec  

    Value: 5

### AMR_NB

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

```
static val AMR_NB: Int
```

AMR (Narrowband) audio codec  

    Value: 1

### AMR_WB

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

```
static val AMR_WB: Int
```

AMR (Wideband) audio codec  

    Value: 2

### DEFAULT

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

```
static val DEFAULT: Int
```  

    Value: 0

### HE_AAC

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

```
static val HE_AAC: Int
```

High Efficiency AAC (HE-AAC) audio codec  

    Value: 4

### OPUS

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

```
static val OPUS: Int
```

Opus audio codec  

    Value: 7

### VORBIS

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

```
static val VORBIS: Int
```

Ogg Vorbis audio codec (Support is optional)  

    Value: 6