Compartir a través de


MediaRecorder.SetAudioEncoder(AudioEncoder) Method

Definition

Sets the audio encoder to be used for recording.

[Android.Runtime.Register("setAudioEncoder", "(I)V", "GetSetAudioEncoder_IHandler")]
public virtual void SetAudioEncoder (Android.Media.AudioEncoder audio_encoder);
[<Android.Runtime.Register("setAudioEncoder", "(I)V", "GetSetAudioEncoder_IHandler")>]
abstract member SetAudioEncoder : Android.Media.AudioEncoder -> unit
override this.SetAudioEncoder : Android.Media.AudioEncoder -> unit

Parameters

audio_encoder
AudioEncoder

the audio encoder to use.

Attributes

Exceptions

if 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().

Java documentation for android.media.MediaRecorder.setAudioEncoder(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to