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.AudioSource#constants) \| [Inherited Methods](https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#inhmethods)

# MediaRecorder.AudioSource

*** ** * ** ***


`
public

final

class
MediaRecorder.AudioSource
`


`

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


`

`


`

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

<br />

*** ** * ** ***

Defines the audio source.
An audio source defines both a default physical source of audio signal, and a recording
configuration. These constants are for instance used
in `https://developer.android.com/reference/android/media/MediaRecorder#setAudioSource(int)` or
`https://developer.android.com/reference/android/media/AudioRecord.Builder#setAudioSource(int)`.

## Summary

| ### Constants ||
|---|---|
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#CAMCORDER` Microphone audio source tuned for video recording, with the same orientation as the camera if available. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#DEFAULT` Default audio source \* |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#MIC` Microphone audio source |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#REMOTE_SUBMIX` Audio source for a submix of audio streams to be presented remotely. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#UNPROCESSED` Microphone audio source tuned for unprocessed (raw) sound if available, behaves like `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#DEFAULT` otherwise. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#VOICE_CALL` Voice call uplink + downlink audio source Capturing from `VOICE_CALL` source requires the `https://developer.android.com/reference/android/Manifest.permission#CAPTURE_AUDIO_OUTPUT` permission. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#VOICE_COMMUNICATION` Microphone audio source tuned for voice communications such as VoIP. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#VOICE_DOWNLINK` Voice call downlink (Rx) audio source. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#VOICE_PERFORMANCE` Source for capturing audio meant to be processed in real time and played back for live performance (e.g karaoke). |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#VOICE_RECOGNITION` Microphone audio source tuned for voice recognition. |
| `int` | `https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#VOICE_UPLINK` Voice call uplink (Tx) audio source. |

| ### 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*. | ||

## Constants

### CAMCORDER

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

```
public static final int CAMCORDER
```

Microphone audio source tuned for video recording, with the same orientation
as the camera if available.

<br />

Constant Value:

5
(0x00000005)


### DEFAULT

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

```
public static final int DEFAULT
```

Default audio source \*

<br />

Constant Value:

0
(0x00000000)


### MIC

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

```
public static final int MIC
```

Microphone audio source

<br />

Constant Value:

1
(0x00000001)


### REMOTE_SUBMIX

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

```
public static final int REMOTE_SUBMIX
```

Audio source for a submix of audio streams to be presented remotely.


An application can use this audio source to capture a mix of audio streams
that should be transmitted to a remote receiver such as a Wifi display.
While recording is active, these audio streams are redirected to the remote
submix instead of being played on the device speaker or headset.


Certain streams are excluded from the remote submix, including
`https://developer.android.com/reference/android/media/AudioManager#STREAM_RING`, `https://developer.android.com/reference/android/media/AudioManager#STREAM_ALARM`,
and `https://developer.android.com/reference/android/media/AudioManager#STREAM_NOTIFICATION`. These streams will continue
to be presented locally as usual.


Capturing the remote submix audio requires the
`https://developer.android.com/reference/android/Manifest.permission#CAPTURE_AUDIO_OUTPUT` permission.
This permission is reserved for use by system components and is not available to
third-party applications.
.   
Requires `https://developer.android.com/reference/android/Manifest.permission#CAPTURE_AUDIO_OUTPUT`

<br />

<br />

Constant Value:

8
(0x00000008)


### UNPROCESSED

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

```
public static final int UNPROCESSED
```

Microphone audio source tuned for unprocessed (raw) sound if available, behaves like
`https://developer.android.com/reference/android/media/MediaRecorder.AudioSource#DEFAULT` otherwise.

<br />

Constant Value:

9
(0x00000009)


### VOICE_CALL

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

```
public static final int VOICE_CALL
```

Voice call uplink + downlink audio source


Capturing from `VOICE_CALL` source requires the
`https://developer.android.com/reference/android/Manifest.permission#CAPTURE_AUDIO_OUTPUT` permission.
This permission is reserved for use by system components and is not available to
third-party applications.

<br />

<br />

Constant Value:

4
(0x00000004)


### VOICE_COMMUNICATION

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

```
public static final int VOICE_COMMUNICATION
```

Microphone audio source tuned for voice communications such as VoIP. It
will for instance take advantage of echo cancellation or automatic gain control
if available.

<br />

Constant Value:

7
(0x00000007)


### VOICE_DOWNLINK

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

```
public static final int VOICE_DOWNLINK
```

Voice call downlink (Rx) audio source.


Capturing from `VOICE_DOWNLINK` source requires the
`https://developer.android.com/reference/android/Manifest.permission#CAPTURE_AUDIO_OUTPUT` permission.
This permission is reserved for use by system components and is not available to
third-party applications.

<br />

<br />

Constant Value:

3
(0x00000003)


### VOICE_PERFORMANCE

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

```
public static final int VOICE_PERFORMANCE
```

Source for capturing audio meant to be processed in real time and played back for live
performance (e.g karaoke).


The capture path will minimize latency and coupling with
playback path.

<br />

<br />

Constant Value:

10
(0x0000000a)


### VOICE_RECOGNITION

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

```
public static final int VOICE_RECOGNITION
```

Microphone audio source tuned for voice recognition.

<br />

Constant Value:

6
(0x00000006)


### VOICE_UPLINK

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

```
public static final int VOICE_UPLINK
```

Voice call uplink (Tx) audio source.


Capturing from `VOICE_UPLINK` source requires the
`https://developer.android.com/reference/android/Manifest.permission#CAPTURE_AUDIO_OUTPUT` permission.
This permission is reserved for use by system components and is not available to
third-party applications.

<br />

<br />

Constant Value:

2
(0x00000002)