Enum AudioCaptureUsage
#[repr(u32)]pub enum AudioCaptureUsage {
Background = 0,
Foreground = 1,
SystemAgent = 2,
Communication = 3,
}
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 = 0
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 = 1
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 = 2
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 = 3
Stream is intended to be used for some form of real time user to user communication. Voice/Video chat should use this.
Implementations§
§impl AudioCaptureUsage
impl AudioCaptureUsage
pub fn from_primitive(prim: u32) -> Option<AudioCaptureUsage>
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
is_unknown
Trait Implementations§
§impl Clone for AudioCaptureUsage
impl Clone for AudioCaptureUsage
§fn clone(&self) -> AudioCaptureUsage
fn clone(&self) -> AudioCaptureUsage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for AudioCaptureUsage
impl Debug for AudioCaptureUsage
§impl<D> Decode<AudioCaptureUsage, D> for AudioCaptureUsagewhere
D: ResourceDialect,
impl<D> Decode<AudioCaptureUsage, D> for AudioCaptureUsagewhere
D: ResourceDialect,
§fn new_empty() -> AudioCaptureUsage
fn new_empty() -> AudioCaptureUsage
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<AudioCaptureUsage, D> for AudioCaptureUsagewhere
D: ResourceDialect,
impl<D> Encode<AudioCaptureUsage, D> for AudioCaptureUsagewhere
D: ResourceDialect,
§impl Hash for AudioCaptureUsage
impl Hash for AudioCaptureUsage
§impl Ord for AudioCaptureUsage
impl Ord for AudioCaptureUsage
§fn cmp(&self, other: &AudioCaptureUsage) -> Ordering
fn cmp(&self, other: &AudioCaptureUsage) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for AudioCaptureUsage
impl PartialEq for AudioCaptureUsage
§impl PartialOrd for AudioCaptureUsage
impl PartialOrd for AudioCaptureUsage
§impl TypeMarker for AudioCaptureUsage
impl TypeMarker for AudioCaptureUsage
§type Owned = AudioCaptureUsage
type Owned = AudioCaptureUsage
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align
.§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 more§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.§impl ValueTypeMarker for AudioCaptureUsage
impl ValueTypeMarker for AudioCaptureUsage
§type Borrowed<'a> = AudioCaptureUsage
type Borrowed<'a> = AudioCaptureUsage
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<AudioCaptureUsage as TypeMarker>::Owned,
) -> <AudioCaptureUsage as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<AudioCaptureUsage as TypeMarker>::Owned, ) -> <AudioCaptureUsage as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.