pub struct Sound<'a>(/* private fields */);
Implementations§
Source§impl<'aud> Sound<'aud>
impl<'aud> Sound<'aud>
pub fn is_sound_valid(&self) -> bool
pub fn frame_count(&self) -> u32
pub unsafe fn inner(self) -> Sound
Sourcepub fn is_playing(&self) -> bool
pub fn is_playing(&self) -> bool
Checks if a sound is currently playing.
Sourcepub fn set_volume(&self, volume: f32)
pub fn set_volume(&self, volume: f32)
Sets volume for a sound (1.0
is max level).
pub fn set_pan(&self, pan: f32)
Trait Implementations§
Source§impl<'aud> AsMut<AudioStream> for Sound<'aud>
impl<'aud> AsMut<AudioStream> for Sound<'aud>
Source§fn as_mut(&mut self) -> &mut AudioStream
fn as_mut(&mut self) -> &mut AudioStream
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl<'aud> AsRef<AudioStream> for Sound<'aud>
impl<'aud> AsRef<AudioStream> for Sound<'aud>
Source§fn as_ref(&self) -> &AudioStream
fn as_ref(&self) -> &AudioStream
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl<'a> Freeze for Sound<'a>
impl<'a> RefUnwindSafe for Sound<'a>
impl<'a> !Send for Sound<'a>
impl<'a> !Sync for Sound<'a>
impl<'a> Unpin for Sound<'a>
impl<'a> UnwindSafe for Sound<'a>
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