Enum ndk::audio::AudioContentType
source · #[non_exhaustive]#[repr(i32)]pub enum AudioContentType {
Speech = 1,
Music = 2,
Movie = 3,
Sonification = 4,
}
Available on crate features
audio
and api-level-28
only.Expand description
The ContentType attribute describes “what” you are playing.
It expresses the general category of the content. This information is optional.
But in case it is known (for instance Movie
for a
movie streaming service or Speech
for
an audio book application) this information might be used by the audio framework to
enforce audio focus.
Note that these match the equivalent values in android.media.AudioAttributes
in the Android Java API.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Speech = 1
Use this for spoken voice, audio books, etcetera.
Music = 2
Use this for pre-recorded or live music.
Movie = 3
Use this for a movie or video soundtrack.
Sonification = 4
Use this for sound is designed to accompany a user action, such as a click or beep sound made when the user presses a button.
Trait Implementations§
source§impl Clone for AudioContentType
impl Clone for AudioContentType
source§fn clone(&self) -> AudioContentType
fn clone(&self) -> AudioContentType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AudioContentType
impl Debug for AudioContentType
source§impl From<AudioContentType> for i32
impl From<AudioContentType> for i32
source§fn from(enum_value: AudioContentType) -> Self
fn from(enum_value: AudioContentType) -> Self
Converts to this type from the input type.
source§impl From<i32> for AudioContentType
impl From<i32> for AudioContentType
source§impl FromPrimitive for AudioContentType
impl FromPrimitive for AudioContentType
source§impl PartialEq for AudioContentType
impl PartialEq for AudioContentType
source§fn eq(&self, other: &AudioContentType) -> bool
fn eq(&self, other: &AudioContentType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for AudioContentType
impl Eq for AudioContentType
impl StructuralPartialEq for AudioContentType
Auto Trait Implementations§
impl Freeze for AudioContentType
impl RefUnwindSafe for AudioContentType
impl Send for AudioContentType
impl Sync for AudioContentType
impl Unpin for AudioContentType
impl UnwindSafe for AudioContentType
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more