pub fn hook_finished(f: fn()) {
        unsafe {
            MUSIC_FINISHED_HOOK = Some(f);
            sys::mixer::Mix_HookMusicFinished(Some(c_music_finished_hook as extern "C" fn()));
        }
    }
/// 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);
/// ```
Sets up a function to be called when music playback is halted.
Sets up a function to be called when music playback is halted .
pub fn hook_finished(f: fn()) {
        unsafe {
            MUSIC_FINISHED_HOOK = Some(f);
            sys::mixer::Mix_HookMusicFinished(Some(c_music_finished_hook as extern "C" fn()));
        }
    }
pub fn hook_finished ( f : fn ( ) ) { unsafe { MUSIC_FINISHED_HOOK = Some ( f ) ; sys :: mixer :: Mix_HookMusicFinished ( Some ( c_music_finished_hook as extern " " fn ( ) ) ) ; } }
Sets up a function to be called when music playback is halted.
Sets up a function to be called when music playback is halted .
f
fn()
f
fn()
examples
```
fn after_music() {
println!("Music has ended");
}

:mixer::Music::hook_finished(after_music);
```
` ` ` fn after_music () { println! ( " Music has ended " ) ; } : mixer :: Music :: hook_finished ( after_music ) ; ` ` `