#[repr(u32)]
pub enum AudioInputPreset {
    Generic,
    Camcorder,
    VoiceRecognition,
    VoiceCommunication,
    Unprocessed,
    VoicePerformance,
}
Available on crate features audio and api-level-28 only.
Expand description

Defines the audio source. An audio source defines both a default physical source of audio signal, and a recording configuration.

Note that these match the equivalent values in MediaRecorder.AudioSource in the Android Java API.

Variants

Generic

Use this preset when other presets do not apply.

Camcorder

Use this preset when recording video.

VoiceRecognition

Use this preset when doing speech recognition.

VoiceCommunication

Use this preset when doing telephony or voice messaging.

Unprocessed

Use this preset to obtain an input with no effects. Note that this input will not have automatic gain control so the recorded volume may be very low.

VoicePerformance

Available on crate feature api-level-29 only.

Use this preset 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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.