pub struct Music<'a>(/* private fields */);
Implementations§
source§impl<'aud> Music<'aud>
impl<'aud> Music<'aud>
sourcepub fn play_stream(&mut self)
pub fn play_stream(&mut self)
Starts music playing.
sourcepub fn update_stream(&mut self)
pub fn update_stream(&mut self)
Updates buffers for music streaming.
sourcepub fn stop_stream(&mut self)
pub fn stop_stream(&mut self)
Stops music playing.
sourcepub fn pause_stream(&mut self)
pub fn pause_stream(&mut self)
Pauses music playing.
sourcepub fn resume_stream(&mut self)
pub fn resume_stream(&mut self)
Resumes playing paused music.
sourcepub fn is_stream_playing(&self) -> bool
pub fn is_stream_playing(&self) -> bool
Checks if music is playing.
sourcepub fn set_volume(&mut self, volume: f32)
pub fn set_volume(&mut self, volume: f32)
Sets volume for music (1.0
is max level).
sourcepub fn get_time_length(&self) -> f32
pub fn get_time_length(&self) -> f32
Gets music time length in seconds.
sourcepub fn get_time_played(&self) -> f32
pub fn get_time_played(&self) -> f32
Gets current music time played in seconds.
pub fn seek_stream(&mut self, position: f32)
pub fn set_pan(&mut self, pan: f32)
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Music<'a>
impl<'a> RefUnwindSafe for Music<'a>
impl<'a> !Send for Music<'a>
impl<'a> !Sync for Music<'a>
impl<'a> Unpin for Music<'a>
impl<'a> UnwindSafe for Music<'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