[][src]Enum oboe::Usage

#[repr(i32)]pub enum Usage {
    Media,
    VoiceCommunication,
    VoiceCommunicationSignalling,
    Alarm,
    Notification,
    NotificationRingtone,
    NotificationEvent,
    AssistanceAccessibility,
    AssistanceNavigationGuidance,
    AssistanceSonification,
    Game,
    Assistant,
}

The Usage attribute expresses why you are playing a sound, what is this sound used for. This information is used by certain platforms or routing policies to make more refined volume or routing decisions.

Note that these match the equivalent values in AudioAttributes in the Android Java API.

This attribute only has an effect on Android API 28+.

Variants

Media

Use this for streaming media, music performance, video, podcasts, etcetera.

VoiceCommunication

Use this for voice over IP, telephony, etcetera.

VoiceCommunicationSignalling

Use this for sounds associated with telephony such as busy tones, DTMF, etcetera.

Alarm

Use this to demand the users attention.

Notification

Use this for notifying the user when a message has arrived or some other background event has occured.

NotificationRingtone

Use this when the phone rings.

NotificationEvent

Use this to attract the users attention when, for example, the battery is low.

AssistanceAccessibility

Use this for screen readers, etcetera.

AssistanceNavigationGuidance

Use this for driving or navigation directions.

AssistanceSonification

Use this for user interface sounds, beeps, etcetera.

Game

Use this for game audio and sound effects.

Assistant

Use this for audio responses to user queries, audio instructions or help utterances.

Trait Implementations

impl Clone for Usage[src]

impl Copy for Usage[src]

impl Debug for Usage[src]

impl Eq for Usage[src]

impl FromPrimitive for Usage[src]

impl PartialEq<Usage> for Usage[src]

impl StructuralEq for Usage[src]

impl StructuralPartialEq for Usage[src]

impl ToPrimitive for Usage[src]

Auto Trait Implementations

impl RefUnwindSafe for Usage

impl Send for Usage

impl Sync for Usage

impl Unpin for Usage

impl UnwindSafe for Usage

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Desc<'a, T> for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.