[][src]Struct ggez::audio::Source

pub struct Source { /* fields omitted */ }

A source of audio data that is connected to an output channel and ready to play. It will stop playing when dropped.

Methods

impl Source[src]

pub fn new<P: AsRef<Path>>(context: &mut Context, path: P) -> GameResult<Self>[src]

Create a new Source from the given file.

pub fn from_data(context: &mut Context, data: SoundData) -> GameResult<Self>[src]

Creates a new Source using the given SoundData object.

Trait Implementations

impl SoundSource for Source[src]

fn play(&mut self) -> GameResult[src]

Plays the audio source; restarts the sound if currently playing

impl Debug for Source[src]

Auto Trait Implementations

impl Unpin for Source

impl Sync for Source

impl Send for Source

impl RefUnwindSafe for Source

impl UnwindSafe for Source

Blanket Implementations

impl<T> From<T> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T> Erased for T

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.