to top
Android APIs
public final class

MediaRecorder.AudioSource

extends Object
java.lang.Object
   ↳ android.media.MediaRecorder.AudioSource

Class Overview

Defines the audio source. These constants are used with setAudioSource(int).

Summary

Constants
int CAMCORDER Microphone audio source with same orientation as camera if available, the main device microphone otherwise
int DEFAULT Default audio source
int MIC Microphone audio source
int VOICE_CALL Voice call uplink + downlink audio source
int VOICE_COMMUNICATION Microphone audio source tuned for voice communications such as VoIP.
int VOICE_DOWNLINK Voice call downlink (Rx) audio source
int VOICE_RECOGNITION Microphone audio source tuned for voice recognition if available, behaves like DEFAULT otherwise.
int VOICE_UPLINK Voice call uplink (Tx) audio source
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int CAMCORDER

Added in API level 7

Microphone audio source with same orientation as camera if available, the main device microphone otherwise

Constant Value: 5 (0x00000005)

public static final int DEFAULT

Added in API level 1

Default audio source

Constant Value: 0 (0x00000000)

public static final int MIC

Added in API level 1

Microphone audio source

Constant Value: 1 (0x00000001)

public static final int VOICE_CALL

Added in API level 4

Voice call uplink + downlink audio source

Constant Value: 4 (0x00000004)

public static final int VOICE_COMMUNICATION

Added in API level 11

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. It otherwise behaves like DEFAULT if no voice processing is applied.

Constant Value: 7 (0x00000007)

public static final int VOICE_DOWNLINK

Added in API level 4

Voice call downlink (Rx) audio source

Constant Value: 3 (0x00000003)

public static final int VOICE_RECOGNITION

Added in API level 7

Microphone audio source tuned for voice recognition if available, behaves like DEFAULT otherwise.

Constant Value: 6 (0x00000006)

public static final int VOICE_UPLINK

Added in API level 4

Voice call uplink (Tx) audio source

Constant Value: 2 (0x00000002)