Struct bevy::prelude::Audio[]

pub struct Audio<P = AudioSource> where
    P: Asset + Decodable
{ pub queue: RwLock<RawRwLock, VecDeque<Handle<P>>>, }

The external struct used to play audio

Fields

queue: RwLock<RawRwLock, VecDeque<Handle<P>>>

Implementations

impl<P> Audio<P> where
    P: Asset + Decodable,
    <P as Decodable>::Decoder: Source,
    <P as Decodable>::Decoder: Send,
    <P as Decodable>::Decoder: Sync,
    <<P as Decodable>::Decoder as Iterator>::Item: Sample,
    <<P as Decodable>::Decoder as Iterator>::Item: Send,
    <<P as Decodable>::Decoder as Iterator>::Item: Sync

pub fn play(&self, audio_source: Handle<P>)

Trait Implementations

impl<P> Debug for Audio<P> where
    P: Asset + Decodable

impl<P> Default for Audio<P> where
    P: Asset + Decodable

Auto Trait Implementations

impl<P = AudioSource> !RefUnwindSafe for Audio<P>

impl<P> Send for Audio<P>

impl<P> Sync for Audio<P>

impl<P> Unpin for Audio<P> where
    P: Unpin

impl<P> UnwindSafe for Audio<P> where
    P: UnwindSafe

Blanket Implementations

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

impl<T> Any for T where
    T: Any

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

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

impl<T> Component for T where
    T: 'static + Send + Sync

impl<T> Downcast for T where
    T: Any

impl<T> Downcast<T> for T

impl<T> DowncastSync for T where
    T: Any + Send + Sync

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

impl<T> FromWorld for T where
    T: Default

impl<T> Instrument for T[src]

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

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.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,