table of contents
- experimental 3~git20250302~78a2035+ds-1
Mix_FadeInMusic(3) | SDL_mixer3 FUNCTIONS | Mix_FadeInMusic(3) |
NAME¶
Mix_FadeInMusic - Play a new music object, fading in the audio.
HEADER FILE¶
Defined in SDL3_mixer/SDL_mixer.h
SYNOPSIS¶
#include "SDL3_mixer/SDL_mixer.h"
bool Mix_FadeInMusic(Mix_Music *music, int loops, int ms);
DESCRIPTION¶
This will start the new music playing, much like
Mix_PlayMusic () will, but will start the music playing at silence and fade in to its normal volume over the specified number of milliseconds.
If there is already music playing, that music will be halted and the new music object will take its place.
If loops is greater than zero, loop the music that many times. If loops is -1, loop "infinitely" (~65000 times).
Fading music will change it's volume progressively, as if
Mix_VolumeMusic () was called on it (which is to say: you probably shouldn't call Mix_VolumeMusic () on fading music).
FUNCTION PARAMETERS¶
RETURN VALUE¶
Returns true on success or false on failure; call SDL_GetError() for more information.
AVAILABILITY¶
This function is available since SDL_mixer 3.0.0.
SDL_mixer 3.0.0 | SDL_mixer |