pub struct BgmEngine { /* private fields */ }Implementations§
Source§impl BgmEngine
impl BgmEngine
pub fn new(project_dir: PathBuf) -> Self
pub fn current_name(&self) -> Option<&str>
pub fn set_current_append_dir(&mut self, append_dir: impl Into<String>)
pub fn volume_raw(&self) -> u8
pub fn set_volume_raw( &mut self, _audio: &mut AudioHub, volume_raw: u8, ) -> Result<()>
pub fn set_volume_raw_fade( &mut self, _audio: &mut AudioHub, volume_raw: u8, fade_ms: i64, ) -> Result<()>
pub fn set_system_volume_raw(&mut self, volume_raw: u8)
pub fn set_looping(&mut self, looping: bool) -> Result<()>
pub fn check_state(&self) -> i32
pub fn is_playing(&self) -> bool
pub fn is_fade_out_doing(&self) -> bool
pub fn can_wait(&self) -> bool
pub fn play_name_script( &mut self, audio: &mut AudioHub, name: &str, loop_flag: bool, fade_in_ms: i64, fade_out_ms: i64, start_pos_sample: i64, ready_only: bool, delay_time_ms: i64, ) -> Result<()>
pub fn ready_name( &mut self, audio: &mut AudioHub, name: &str, start_pos_sample: i64, ) -> Result<()>
pub fn play_name_with_options( &mut self, audio: &mut AudioHub, name: &str, start_pos_sample: i64, fade_in_ms: i64, ) -> Result<()>
pub fn play_name(&mut self, audio: &mut AudioHub, name: &str) -> Result<()>
pub fn play_pos_samples(&self) -> u64
pub fn pause_fade(&mut self, _audio: &mut AudioHub, fade_ms: i64) -> Result<()>
pub fn pause(&mut self) -> Result<()>
pub fn resume_script( &mut self, audio: &mut AudioHub, fade_in_ms: i64, delay_time_ms: i64, ) -> Result<()>
pub fn resume_fade(&mut self, audio: &mut AudioHub, fade_ms: i64) -> Result<()>
pub fn resume(&mut self) -> Result<()>
pub fn stop(&mut self) -> Result<()>
pub fn stop_fade(&mut self, fade_out_ms: i64) -> Result<()>
pub fn tick(&mut self, audio: &mut AudioHub) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BgmEngine
impl !RefUnwindSafe for BgmEngine
impl Send for BgmEngine
impl Sync for BgmEngine
impl Unpin for BgmEngine
impl UnsafeUnpin for BgmEngine
impl !UnwindSafe for BgmEngine
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.