Struct rodio::SpatialSink [−][src]
pub struct SpatialSink { /* fields omitted */ }
Methods
impl SpatialSink
[src]
impl SpatialSink
pub fn new(
device: &Device,
emitter_position: [f32; 3],
left_ear: [f32; 3],
right_ear: [f32; 3]
) -> SpatialSink
[src]
pub fn new(
device: &Device,
emitter_position: [f32; 3],
left_ear: [f32; 3],
right_ear: [f32; 3]
) -> SpatialSink
Builds a new SpatialSink
.
pub fn set_emitter_position(&mut self, pos: [f32; 3])
[src]
pub fn set_emitter_position(&mut self, pos: [f32; 3])
Sets the position of the sound emitter in 3 dimensional space.
pub fn set_left_ear_position(&mut self, pos: [f32; 3])
[src]
pub fn set_left_ear_position(&mut self, pos: [f32; 3])
Sets the position of the left ear in 3 dimensional space.
pub fn set_right_ear_position(&mut self, pos: [f32; 3])
[src]
pub fn set_right_ear_position(&mut self, pos: [f32; 3])
Sets the position of the right ear in 3 dimensional space.
pub fn append<S>(&self, source: S) where
S: Source + Send + 'static,
S::Item: Sample + Send + Debug,
[src]
pub fn append<S>(&self, source: S) where
S: Source + Send + 'static,
S::Item: Sample + Send + Debug,
Appends a sound to the queue of sounds to play.
pub fn volume(&self) -> f32
[src]
pub fn volume(&self) -> f32
The value 1.0
is the "normal" volume (unfiltered input). Any value other than 1.0 will
multiply each sample by this value.
pub fn set_volume(&mut self, value: f32)
[src]
pub fn set_volume(&mut self, value: f32)
Changes the volume of the sound.
The value 1.0
is the "normal" volume (unfiltered input). Any value other than 1.0 will
multiply each sample by this value.
pub fn play(&self)
[src]
pub fn play(&self)
Resumes playback of a paused sound.
No effect if not paused.
pub fn pause(&self)
[src]
pub fn pause(&self)
Pauses playback of this sink.
No effect if already paused.
A paused sound can be resumed with play()
.
pub fn is_paused(&self) -> bool
[src]
pub fn is_paused(&self) -> bool
Gets if a sound is paused
Sounds can be paused and resumed using pause() and play(). This gets if a sound is paused.
pub fn detach(self)
[src]
pub fn detach(self)
Destroys the sink without stopping the sounds that are still playing.
pub fn sleep_until_end(&self)
[src]
pub fn sleep_until_end(&self)
Sleeps the current thread until the sound ends.
pub fn empty(&self) -> bool
[src]
pub fn empty(&self) -> bool
Returns true if this sink has no more sounds to play.
Auto Trait Implementations
impl Send for SpatialSink
impl Send for SpatialSink
impl Sync for SpatialSink
impl Sync for SpatialSink