Android.Media.MediaRecorder.SetAudioEncoder Method
Sets the audio encoder to be used for recording.

Syntax

[Android.Runtime.Register("setAudioEncoder", "(I)V", "GetSetAudioEncoder_IHandler")]
public virtual void SetAudioEncoder ([Android.Runtime.GeneratedEnum] AudioEncoder audio_encoder)

Parameters

audio_encoder
the audio encoder to use.

Exceptions

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

Remarks

Sets the audio encoder to be used for recording. If this method is not called, the output file will not contain an audio track. Call this after setOutputFormat() but before prepare().

[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