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§
Source§impl AudioRenderUsage2
impl AudioRenderUsage2
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 AudioRenderUsage2
impl Clone for AudioRenderUsage2
Source§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 moreSource§impl Debug for AudioRenderUsage2
impl Debug for AudioRenderUsage2
Source§impl<D: ResourceDialect> Decode<AudioRenderUsage2, D> for AudioRenderUsage2
impl<D: ResourceDialect> Decode<AudioRenderUsage2, D> for AudioRenderUsage2
Source§impl<D: ResourceDialect> Encode<AudioRenderUsage2, D> for AudioRenderUsage2
impl<D: ResourceDialect> Encode<AudioRenderUsage2, D> for AudioRenderUsage2
Source§impl Hash for AudioRenderUsage2
impl Hash for AudioRenderUsage2
Source§impl Ord for AudioRenderUsage2
impl Ord for AudioRenderUsage2
Source§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,
Source§impl PartialEq for AudioRenderUsage2
impl PartialEq for AudioRenderUsage2
Source§impl PartialOrd for AudioRenderUsage2
impl PartialOrd for AudioRenderUsage2
Source§impl TypeMarker for AudioRenderUsage2
impl TypeMarker for AudioRenderUsage2
Source§type Owned = AudioRenderUsage2
type Owned = AudioRenderUsage2
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 AudioRenderUsage2
impl ValueTypeMarker for AudioRenderUsage2
Source§type Borrowed<'a> = AudioRenderUsage2
type Borrowed<'a> = AudioRenderUsage2
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more