Android.Media.MediaRecorder.SetAudioSource Method
Sets the audio source to be used for recording.

Syntax

[Android.Runtime.Register("setAudioSource", "(I)V", "GetSetAudioSource_IHandler")]
public virtual void SetAudioSource ([Android.Runtime.GeneratedEnum] AudioSource audio_source)

Parameters

audio_source
the audio source to use

Exceptions

TypeReason
Java.Lang.IllegalStateExceptionif it is called after setOutputFormat()

Remarks

Sets the audio source to be used for recording. If this method is not called, the output file will not contain an audio track. The source needs to be specified before setting recording-parameters or encoders. Call this only before setOutputFormat().

[Android Documentation]

Requirements

Namespace: Android.Media
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1