pub struct SoundBank {
pub audio_tracks: Vec<String>,
pub sound_effects: Vec<SoundEffect>,
/* private fields */
}Fields§
§audio_tracks: Vec<String>§sound_effects: Vec<SoundEffect>Implementations§
Source§impl SoundBank
impl SoundBank
pub fn new() -> Self
pub fn add_sound_sample(&mut self, path: String) -> usize
pub fn add_sound_sample_with_index(&mut self, index: usize, path: String)
pub fn add_sound_effect(&mut self, sound_effect: SoundEffect)
pub fn get_sound_sample(&self, index: usize) -> Option<String>
pub fn get_index_sample(&self, sample_path: &str) -> Option<usize>
pub fn get_sample_paths(&self) -> Vec<String>
pub fn contains_path(&self, path: &str) -> bool
pub fn sample_count(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl FromWasmAbi for SoundBank
impl FromWasmAbi for SoundBank
Source§impl IntoWasmAbi for SoundBank
impl IntoWasmAbi for SoundBank
Source§impl LongRefFromWasmAbi for SoundBank
impl LongRefFromWasmAbi for SoundBank
Source§impl OptionFromWasmAbi for SoundBank
impl OptionFromWasmAbi for SoundBank
Source§impl OptionIntoWasmAbi for SoundBank
impl OptionIntoWasmAbi for SoundBank
Source§impl RefFromWasmAbi for SoundBank
impl RefFromWasmAbi for SoundBank
Source§impl RefMutFromWasmAbi for SoundBank
impl RefMutFromWasmAbi for SoundBank
impl SupportsConstructor for SoundBank
impl SupportsInstanceProperty for SoundBank
impl SupportsStaticProperty for SoundBank
Source§impl TryFromJsValue for SoundBank
impl TryFromJsValue for SoundBank
Source§impl VectorFromWasmAbi for SoundBank
impl VectorFromWasmAbi for SoundBank
Source§impl VectorIntoWasmAbi for SoundBank
impl VectorIntoWasmAbi for SoundBank
Auto Trait Implementations§
impl Freeze for SoundBank
impl RefUnwindSafe for SoundBank
impl Send for SoundBank
impl Sync for SoundBank
impl Unpin for SoundBank
impl UnsafeUnpin for SoundBank
impl UnwindSafe for SoundBank
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.