Enum AudioRenderUsage2
pub enum AudioRenderUsage2 {
Background,
Media,
Interruption,
SystemAgent,
Communication,
Accessibility,
// some variants omitted
}
Expand description
Usage annotating the purpose of the stream being used to render audio. An AudioRenderer’s usage cannot be changed after creation. The AudioRenderUsage2 value is used by audio policy to dictate how audio streams interact with each other. This enum expands the original (strict) enum |AudioRenderUsage| with additional stream types.
Variants§
Background
Stream is intended to be used for ambient or background sound. Streams that can be interrupted without consequence should use this.
Media
Stream is intended to be used for normal functionality. Streams that are part of normal functionality should use this.
Interruption
Stream is intended to interrupt any ongoing function of the device. Streams that are used for interruptions like notifications should use this.
SystemAgent
Stream is for interaction with a system agent. This should be used in response to a user initiated trigger.
Communication
Stream is intended to be used for some form of real time user to user communication. Voice/Video chat should use this.
Accessibility
Stream is intended to be used for accessibility or other non-system- agent speech output, such as screen reader TTS.
Implementations§
§impl AudioRenderUsage2
impl AudioRenderUsage2
pub fn from_primitive(prim: u32) -> Option<AudioRenderUsage2>
pub fn from_primitive_allow_unknown(prim: u32) -> AudioRenderUsage2
pub fn unknown() -> AudioRenderUsage2
pub const fn into_primitive(self) -> u32
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for AudioRenderUsage2
impl Clone for AudioRenderUsage2
§fn clone(&self) -> AudioRenderUsage2
fn clone(&self) -> AudioRenderUsage2
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for AudioRenderUsage2
impl Debug for AudioRenderUsage2
§impl<D> Decode<AudioRenderUsage2, D> for AudioRenderUsage2where
D: ResourceDialect,
impl<D> Decode<AudioRenderUsage2, D> for AudioRenderUsage2where
D: ResourceDialect,
§fn new_empty() -> AudioRenderUsage2
fn new_empty() -> AudioRenderUsage2
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<AudioRenderUsage2, D> for AudioRenderUsage2where
D: ResourceDialect,
impl<D> Encode<AudioRenderUsage2, D> for AudioRenderUsage2where
D: ResourceDialect,
§impl Hash for AudioRenderUsage2
impl Hash for AudioRenderUsage2
§impl Ord for AudioRenderUsage2
impl Ord for AudioRenderUsage2
§fn cmp(&self, other: &AudioRenderUsage2) -> Ordering
fn cmp(&self, other: &AudioRenderUsage2) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
§impl PartialEq for AudioRenderUsage2
impl PartialEq for AudioRenderUsage2
§impl PartialOrd for AudioRenderUsage2
impl PartialOrd for AudioRenderUsage2
§impl TypeMarker for AudioRenderUsage2
impl TypeMarker for AudioRenderUsage2
§type Owned = AudioRenderUsage2
type Owned = AudioRenderUsage2
§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 AudioRenderUsage2
impl ValueTypeMarker for AudioRenderUsage2
§type Borrowed<'a> = AudioRenderUsage2
type Borrowed<'a> = AudioRenderUsage2
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<AudioRenderUsage2 as TypeMarker>::Owned,
) -> <AudioRenderUsage2 as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<AudioRenderUsage2 as TypeMarker>::Owned, ) -> <AudioRenderUsage2 as ValueTypeMarker>::Borrowed<'_>
&Self::Owned
to Self::Borrowed
.