#[repr(C)]pub struct Sound {
pub stream: AudioStream,
pub frameCount: u32,
}Fields§
§stream: AudioStream§frameCount: u32Trait Implementations§
source§impl SoundExt for Sound
impl SoundExt for Sound
source§fn load_from_wave(wave: Wave) -> Sound
fn load_from_wave(wave: Wave) -> Sound
Load sound from wave data
source§fn alias(self) -> Sound
fn alias(self) -> Sound
Create a new sound that shares the same sample data as the source sound, does not own the sound data
source§fn unload_alias(self)
fn unload_alias(self)
Unload a sound alias (does not deallocate sample data)
source§fn is_playing(self) -> bool
fn is_playing(self) -> bool
Check whether a sound is currently playing
source§fn set_volume(self, volume: f32)
fn set_volume(self, volume: f32)
Set volume for a sound (1.0 is max level)
impl Copy for Sound
Auto Trait Implementations§
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