pub struct Music<'a>(/* private fields */);
Implementations§
Source§impl<'aud> Music<'aud>
impl<'aud> Music<'aud>
Sourcepub fn play_stream(&self)
pub fn play_stream(&self)
Starts music playing.
Sourcepub fn update_stream(&self)
pub fn update_stream(&self)
Updates buffers for music streaming.
Sourcepub fn stop_stream(&self)
pub fn stop_stream(&self)
Stops music playing.
Sourcepub fn pause_stream(&self)
pub fn pause_stream(&self)
Pauses music playing.
Sourcepub fn resume_stream(&self)
pub fn resume_stream(&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(&self, volume: f32)
pub fn set_volume(&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(&self, position: f32)
pub fn set_pan(&self, pan: f32)
pub fn is_music_valid(&self) -> bool
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