pub struct SoundDriver { /* private fields */ }
Implementations§
Source§impl SoundDriver
impl SoundDriver
Sourcepub fn new(max_voices: usize) -> SoundDriver
pub fn new(max_voices: usize) -> SoundDriver
Construct a new instance of the SoundDriver
Sourcepub fn set_listener(&mut self, position: Vector3, orientation: Quaternion)
pub fn set_listener(&mut self, position: Vector3, orientation: Quaternion)
Set the listener position & orientation
Sourcepub fn play(
&mut self,
priority: u8,
sample: &Arc<AudioSample>,
looping: bool,
reverb: bool,
volume: f32,
pitch: f32,
pan: f32,
) -> Weak<RwLock<SoundEmitter>>
pub fn play( &mut self, priority: u8, sample: &Arc<AudioSample>, looping: bool, reverb: bool, volume: f32, pitch: f32, pan: f32, ) -> Weak<RwLock<SoundEmitter>>
Start playing a sound effect and return a handle to it
Sourcepub fn play_3d(
&mut self,
priority: u8,
sample: &Arc<AudioSample>,
looping: bool,
reverb: bool,
volume: f32,
pitch: f32,
position: Vector3,
atten_type: AttenuationType,
atten_min_dist: f32,
atten_max_dist: f32,
atten_rolloff: f32,
) -> Weak<RwLock<SoundEmitter>>
pub fn play_3d( &mut self, priority: u8, sample: &Arc<AudioSample>, looping: bool, reverb: bool, volume: f32, pitch: f32, position: Vector3, atten_type: AttenuationType, atten_min_dist: f32, atten_max_dist: f32, atten_rolloff: f32, ) -> Weak<RwLock<SoundEmitter>>
Start playing a 3D sound effect and return a handle to it
Sourcepub fn stop(&mut self, emitter_ref: Weak<RefCell<SoundEmitter>>)
pub fn stop(&mut self, emitter_ref: Weak<RefCell<SoundEmitter>>)
Stop the playing emitter
Auto Trait Implementations§
impl Freeze for SoundDriver
impl RefUnwindSafe for SoundDriver
impl Send for SoundDriver
impl Sync for SoundDriver
impl Unpin for SoundDriver
impl UnwindSafe for SoundDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more