pub enum AudioCaptureUsage2 {
Background,
Foreground,
SystemAgent,
Communication,
// some variants omitted
}
Expand description
Usages annotating the purpose of the stream being used to capture audio. The AudioCaptureUsage is used by audio policy to dictate how audio streams interact with each other.
Variants§
Background
Stream is used to capture audio while in the background. These streams may be active at any the time and are considered privileged. Example: Listening for Hotwords
Foreground
Stream is intended to be used for normal capture functionality. Streams that are used for audio capture while the stream creator is in the foreground should use this. Example: Voice Recorder
SystemAgent
Stream is for interaction with a system agent. This should only be used once a user has signalled their intent to have the interaction with an interested party. Examples: Assistant, Siri, Alexa
Communication
Stream is intended to be used for some form of real time user to user communication. Voice/Video chat should use this.
Implementations§
Source§impl AudioCaptureUsage2
impl AudioCaptureUsage2
pub fn from_primitive(prim: u32) -> Option<Self>
pub fn from_primitive_allow_unknown(prim: u32) -> Self
pub fn unknown() -> Self
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
Source§impl Clone for AudioCaptureUsage2
impl Clone for AudioCaptureUsage2
Source§fn clone(&self) -> AudioCaptureUsage2
fn clone(&self) -> AudioCaptureUsage2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AudioCaptureUsage2
impl Debug for AudioCaptureUsage2
Source§impl<D: ResourceDialect> Decode<AudioCaptureUsage2, D> for AudioCaptureUsage2
impl<D: ResourceDialect> Decode<AudioCaptureUsage2, D> for AudioCaptureUsage2
Source§impl<D: ResourceDialect> Encode<AudioCaptureUsage2, D> for AudioCaptureUsage2
impl<D: ResourceDialect> Encode<AudioCaptureUsage2, D> for AudioCaptureUsage2
Source§impl Hash for AudioCaptureUsage2
impl Hash for AudioCaptureUsage2
Source§impl Ord for AudioCaptureUsage2
impl Ord for AudioCaptureUsage2
Source§fn cmp(&self, other: &AudioCaptureUsage2) -> Ordering
fn cmp(&self, other: &AudioCaptureUsage2) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AudioCaptureUsage2
impl PartialEq for AudioCaptureUsage2
Source§impl PartialOrd for AudioCaptureUsage2
impl PartialOrd for AudioCaptureUsage2
Source§impl TypeMarker for AudioCaptureUsage2
impl TypeMarker for AudioCaptureUsage2
Source§type Owned = AudioCaptureUsage2
type Owned = AudioCaptureUsage2
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.Source§impl ValueTypeMarker for AudioCaptureUsage2
impl ValueTypeMarker for AudioCaptureUsage2
Source§type Borrowed<'a> = AudioCaptureUsage2
type Borrowed<'a> = AudioCaptureUsage2
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more