[−][src]Struct ggez::audio::SpatialSource
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]
P: Into<Point3<f32>>,
Set location of the sound.
pub fn set_ears<P>(&mut self, left: P, right: P) where
P: Into<Point3<f32>>,
[src]
P: Into<Point3<f32>>,
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.
pub fn play_detached(&mut self, ctx: &Context) -> GameResult
[src]
pub fn set_repeat(&mut self, repeat: bool)
[src]
pub fn set_fade_in(&mut self, dur: Duration)
[src]
pub fn set_pitch(&mut self, ratio: f32)
[src]
pub fn repeat(&self) -> bool
[src]
pub fn pause(&self)
[src]
pub fn resume(&self)
[src]
pub fn stop(&mut self, ctx: &Context) -> GameResult
[src]
pub fn stopped(&self) -> bool
[src]
pub fn volume(&self) -> f32
[src]
pub fn set_volume(&mut self, value: f32)
[src]
pub fn paused(&self) -> bool
[src]
pub fn playing(&self) -> bool
[src]
pub fn elapsed(&self) -> Duration
[src]
pub fn set_query_interval(&mut self, t: Duration)
[src]
pub fn play(&mut self, ctx: &Context) -> GameResult
[src]
Auto Trait Implementations
impl RefUnwindSafe for SpatialSource
[src]
impl Send for SpatialSource
[src]
impl Sync for SpatialSource
[src]
impl Unpin for SpatialSource
[src]
impl UnwindSafe for SpatialSource
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,