[][src]Struct ggez::audio::SpatialSource

pub struct SpatialSource { /* fields omitted */ }

A source of audio data located in space relative to a listener's ears. Will stop playing when dropped.

Implementations

impl SpatialSource[src]

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

Create a new SpatialSource from the given file.

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

Creates a new SpatialSource using the given SoundData object.

impl SpatialSource[src]

pub fn set_position<P>(&mut self, pos: P) where
    P: Into<Point3<f32>>, 
[src]

Set location of the sound.

pub fn set_ears<P>(&mut self, left: P, right: P) where
    P: Into<Point3<f32>>, 
[src]

Set locations of the listener's ears

Trait Implementations

impl Debug for SpatialSource[src]

impl SoundSource for SpatialSource[src]

pub fn play_later(&self) -> GameResult[src]

Plays the SpatialSource; waits until done if the sound is currently playing.

Auto Trait Implementations

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<T> From<T> for T[src]

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

impl<T> Pointable for T

type Init = T

The type for initializers.

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<V, T> VZip<V> for T where
    V: MultiLane<T>,