#[repr(C)]pub struct Music {
pub stream: AudioStream,
pub frameCount: u32,
pub looping: bool,
pub ctxType: i32,
pub ctxData: *mut c_void,
}Fields§
§stream: AudioStream§frameCount: u32§looping: bool§ctxType: i32§ctxData: *mut c_voidTrait Implementations§
source§impl MusicExt for Music
impl MusicExt for Music
source§fn load_from_memory(tpe: impl Display, data: &[u8]) -> Result<Music, String>
fn load_from_memory(tpe: impl Display, data: &[u8]) -> Result<Music, String>
Load music stream from data
source§fn is_playing(self) -> bool
fn is_playing(self) -> bool
Check whether music is playing
source§fn set_volume(self, volume: f32)
fn set_volume(self, volume: f32)
Set volume for music (1.0 is max level)
source§fn get_time_length(self) -> f32
fn get_time_length(self) -> f32
Get music time length (in seconds)
source§fn get_time_played(self) -> f32
fn get_time_played(self) -> f32
Get current music time played (in seconds)
impl Copy for Music
Auto Trait Implementations§
impl RefUnwindSafe for Music
impl !Send for Music
impl !Sync for Music
impl Unpin for Music
impl UnwindSafe for Music
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