SDL_image 1.2.4: Mix_FadeOutMusic

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### 4.5.14 Mix_FadeOutMusic

`int Mix_FadeOutMusic(int ms)`

ms
  Milliseconds of time that the fade-out effect should take to go to silence, starting now.

Gradually fade out the music over ms milliseconds starting from now. The music will be halted after the fade out is completed. Only when music is playing and not fading already are set to fade out, including paused channels. Any callback set by `Mix_HookMusicFinished` will be called when the music finishes fading out.

Returns: 1 on success, 0 on failure.

    // fade out music to finish 3 seconds from now
    while(!Mix_FadeOutMusic(3000) && Mix_PlayingMusic()) {
        // wait for any fades to complete
        SDL_Delay(100);
    }

See Also:
4.5.13 Mix_HaltMusic, 4.5.19 Mix_FadingMusic, 4.5.17 Mix_PlayingMusic, 4.5.15 Mix_HookMusicFinished

This document was generated on November, 1 2002 using texi2html