Struct sdl2::mixer::Music [−][src]
Expand description
This is an opaque data type used for Music data.
Fields
raw: *mut Mix_Musicowned: boolImplementations
Load music file to use.
Load music from a static byte buffer.
Play the loaded music loop times through from start to finish. Pass -1 to loop forever.
Fade in over ms milliseconds of time, the loaded music, playing it loop times through from start to finish.
Fade in over ms milliseconds of time, from position.
Returns current volume
Set the volume on a scale of 0 to 128. Values greater than 128 will use 128.
Set the position of the currently playing music.
Setup a command line music player to use to play music.
Gradually fade out the music over ms milliseconds starting from now.
Sets up a function to be called when music playback is halted.
Examples
fn after_music() {
println!("Music has ended");
}
sdl2::mixer::Music::hook_finished(after_music);A previously set up function would no longer be called when music playback is halted.
If music is actively playing, or not.
If music is fading, or not.