pub struct AudioManager { /* private fields */ }Implementations§
Source§impl AudioManager
impl AudioManager
pub fn new() -> Self
pub fn notify_user_gesture(&mut self)
pub fn effective_volume(&self, track: AudioTrack) -> f64
pub fn has_active_music(&self) -> bool
pub fn has_active_ambience(&self) -> bool
pub fn play_oneshot(&mut self, data: &StaticSoundData, track: AudioTrack)
pub fn play_music(&mut self, data: &StaticSoundData, fade_in_secs: f32)
pub fn stop_music(&mut self, fade_out_secs: f32)
pub fn play_ambience(&mut self, data: &StaticSoundData, fade_in_secs: f32)
pub fn stop_ambience(&mut self, fade_out_secs: f32)
pub fn stop_loop_sfx(&mut self, fade_out_secs: f32)
pub fn play_loop_sfx(&mut self, data: &StaticSoundData)
pub fn set_music_live_volume(&mut self, amp: f64, fade_secs: f32)
pub fn set_ambience_live_volume(&mut self, amp: f64, fade_secs: f32)
pub fn set_master_volume(&mut self, volume: f64)
pub fn set_music_volume(&mut self, volume: f64)
pub fn set_ambience_volume(&mut self, volume: f64)
pub fn set_sfx_volume(&mut self, volume: f64)
pub fn set_ui_volume(&mut self, volume: f64)
pub fn master_volume(&self) -> f64
pub fn music_volume(&self) -> f64
pub fn ambience_volume(&self) -> f64
pub fn sfx_volume(&self) -> f64
pub fn ui_volume(&self) -> f64
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AudioManager
impl !RefUnwindSafe for AudioManager
impl Send for AudioManager
impl Sync for AudioManager
impl Unpin for AudioManager
impl UnsafeUnpin for AudioManager
impl !UnwindSafe for AudioManager
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.