Stay organized with collections
Save and categorize content based on your preferences.
AudioEncoder
class AudioEncoder
Defines the audio encoding. These constants are used with MediaRecorder.setAudioEncoder(int)
.
Summary
Constants |
static Int |
AAC Low Complexity (AAC-LC) audio codec
|
static Int |
Enhanced Low Delay AAC (AAC-ELD) audio codec
|
static Int |
AMR (Narrowband) audio codec
|
static Int |
AMR (Wideband) audio codec
|
static Int |
|
static Int |
High Efficiency AAC (HE-AAC) audio codec
|
static Int |
Opus audio codec
|
static Int |
Ogg Vorbis audio codec (Support is optional)
|
Constants
AAC
static val AAC: Int
AAC Low Complexity (AAC-LC) audio codec
Value: 3
AAC_ELD
static val AAC_ELD: Int
Enhanced Low Delay AAC (AAC-ELD) audio codec
Value: 5
AMR_NB
static val AMR_NB: Int
AMR (Narrowband) audio codec
Value: 1
AMR_WB
static val AMR_WB: Int
AMR (Wideband) audio codec
Value: 2
DEFAULT
static val DEFAULT: Int
Value: 0
HE_AAC
static val HE_AAC: Int
High Efficiency AAC (HE-AAC) audio codec
Value: 4
OPUS
static val OPUS: Int
Opus audio codec
Value: 7
VORBIS
static val VORBIS: Int
Ogg Vorbis audio codec (Support is optional)
Value: 6
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# MediaRecorder.AudioEncoder\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAudioEncoder\n============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/media/MediaRecorder.AudioEncoder \"View this page in Java\") \n\n```\nclass AudioEncoder\n```\n\n|---|-----------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.media.MediaRecorder.AudioEncoder](#) |\n\nDefines the audio encoding. These constants are used with [MediaRecorder.setAudioEncoder(int)](/reference/kotlin/android/media/MediaRecorder#setAudioEncoder(kotlin.Int)).\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AAC](#AAC:kotlin.Int) AAC Low Complexity (AAC-LC) audio codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AAC_ELD](#AAC_ELD:kotlin.Int) Enhanced Low Delay AAC (AAC-ELD) audio codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AMR_NB](#AMR_NB:kotlin.Int) AMR (Narrowband) audio codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [AMR_WB](#AMR_WB:kotlin.Int) AMR (Wideband) audio codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DEFAULT](#DEFAULT:kotlin.Int) \u003cbr /\u003e |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [HE_AAC](#HE_AAC:kotlin.Int) High Efficiency AAC (HE-AAC) audio codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [OPUS](#OPUS:kotlin.Int) Opus audio codec |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [VORBIS](#VORBIS:kotlin.Int) Ogg Vorbis audio codec (Support is optional) |\n\nConstants\n---------\n\n### AAC\n\nAdded in [API level 10](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AAC: Int\n```\n\nAAC Low Complexity (AAC-LC) audio codec \n\n Value: 3\n\n### AAC_ELD\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AAC_ELD: Int\n```\n\nEnhanced Low Delay AAC (AAC-ELD) audio codec \n\n Value: 5\n\n### AMR_NB\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AMR_NB: Int\n```\n\nAMR (Narrowband) audio codec \n\n Value: 1\n\n### AMR_WB\n\nAdded in [API level 10](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val AMR_WB: Int\n```\n\nAMR (Wideband) audio codec \n\n Value: 2\n\n### DEFAULT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DEFAULT: Int\n``` \n\n Value: 0\n\n### HE_AAC\n\nAdded in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val HE_AAC: Int\n```\n\nHigh Efficiency AAC (HE-AAC) audio codec \n\n Value: 4\n\n### OPUS\n\nAdded in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val OPUS: Int\n```\n\nOpus audio codec \n\n Value: 7\n\n### VORBIS\n\nAdded in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val VORBIS: Int\n```\n\nOgg Vorbis audio codec (Support is optional) \n\n Value: 6"]]