pub struct Sound { /* private fields */ }Implementations§
Source§impl Sound
impl Sound
Sourcepub fn load(ctx: &AudioContext, data: &[u8]) -> Sound
pub fn load(ctx: &AudioContext, data: &[u8]) -> Sound
Sourcepub fn play(&self, ctx: &AudioContext, params: PlaySoundParams) -> Playback
pub fn play(&self, ctx: &AudioContext, params: PlaySoundParams) -> Playback
pub fn stop(&self, ctx: &AudioContext)
pub fn set_volume(&self, ctx: &AudioContext, volume: f32)
pub fn delete(&self, ctx: &AudioContext)
Auto Trait Implementations§
impl Freeze for Sound
impl RefUnwindSafe for Sound
impl Send for Sound
impl Sync for Sound
impl Unpin for Sound
impl UnwindSafe for Sound
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