#[repr(u32)]
pub enum AudioContentType {
    Speech,
    Music,
    Movie,
    Sonification,
}
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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.