Enum ndk::audio::AudioInputPreset
source · [−]#[repr(u32)]
pub enum AudioInputPreset {
Generic,
Camcorder,
VoiceRecognition,
VoiceCommunication,
Unprocessed,
VoicePerformance,
}
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
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
sourceimpl Clone for AudioInputPreset
impl Clone for AudioInputPreset
sourcefn clone(&self) -> AudioInputPreset
fn clone(&self) -> AudioInputPreset
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AudioInputPreset
impl Debug for AudioInputPreset
sourceimpl From<AudioInputPreset> for u32
impl From<AudioInputPreset> for u32
sourcefn from(enum_value: AudioInputPreset) -> Self
fn from(enum_value: AudioInputPreset) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<AudioInputPreset> for AudioInputPreset
impl PartialEq<AudioInputPreset> for AudioInputPreset
sourceimpl TryFrom<u32> for AudioInputPreset
impl TryFrom<u32> for AudioInputPreset
type Error = TryFromPrimitiveError<AudioInputPreset>
type Error = TryFromPrimitiveError<AudioInputPreset>
The type returned in the event of a conversion error.
sourcefn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for AudioInputPreset
impl TryFromPrimitive for AudioInputPreset
type Primitive = u32
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for AudioInputPreset
impl Eq for AudioInputPreset
impl StructuralEq for AudioInputPreset
impl StructuralPartialEq for AudioInputPreset
Auto Trait Implementations
impl RefUnwindSafe for AudioInputPreset
impl Send for AudioInputPreset
impl Sync for AudioInputPreset
impl Unpin for AudioInputPreset
impl UnwindSafe for AudioInputPreset
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more