Enum ndk::audio::AudioContentType
source · [−]#[repr(u32)]
pub enum AudioContentType {
Speech,
Music,
Movie,
Sonification,
}
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
Speech
Use this for spoken voice, audio books, etcetera.
Music
Use this for pre-recorded or live music.
Movie
Use this for a movie or video soundtrack.
Sonification
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
sourceimpl Clone for AudioContentType
impl Clone for AudioContentType
sourcefn clone(&self) -> AudioContentType
fn clone(&self) -> AudioContentType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for AudioContentType
impl Debug for AudioContentType
sourceimpl From<AudioContentType> for u32
impl From<AudioContentType> for u32
sourcefn from(enum_value: AudioContentType) -> Self
fn from(enum_value: AudioContentType) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<AudioContentType> for AudioContentType
impl PartialEq<AudioContentType> for AudioContentType
sourceimpl TryFrom<u32> for AudioContentType
impl TryFrom<u32> for AudioContentType
type Error = TryFromPrimitiveError<AudioContentType>
type Error = TryFromPrimitiveError<AudioContentType>
The type returned in the event of a conversion error.
sourcefn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
fn try_from(number: u32) -> Result<Self, TryFromPrimitiveError<Self>>
Performs the conversion.
sourceimpl TryFromPrimitive for AudioContentType
impl TryFromPrimitive for AudioContentType
type Primitive = u32
const NAME: &'static str = _
fn try_from_primitive(
number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for AudioContentType
impl Eq for AudioContentType
impl StructuralEq for AudioContentType
impl StructuralPartialEq for AudioContentType
Auto Trait Implementations
impl RefUnwindSafe for AudioContentType
impl Send for AudioContentType
impl Sync for AudioContentType
impl Unpin for AudioContentType
impl UnwindSafe for AudioContentType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more