.\" This manpage content is licensed under Creative Commons .\" Attribution 4.0 International (CC BY 4.0) .\" https://creativecommons.org/licenses/by/4.0/ .\" This manpage was generated from SDL_mixer's wiki page for Mix_FadeInMusicPos: .\" https://wiki.libsdl.org/SDL_mixer/Mix_FadeInMusicPos .\" Generated with SDL/build-scripts/wikiheaders.pl .\" revision 3~git20240319~12fb85e+ds-1 .\" Please report issues in this manpage's content at: .\" https://github.com/libsdl-org/sdlwiki/issues/new .\" Please report issues in the generation of this manpage from the wiki at: .\" https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20Mix_FadeInMusicPos .\" SDL_mixer can be found at https://libsdl.org/projects/SDL_mixer .de URL \$2 \(laURL: \$1 \(ra\$3 .. .if \n[.g] .mso www.tmac .TH Mix_FadeInMusicPos 3 "SDL_mixer 3.0.0" "SDL_mixer" "SDL_mixer3 FUNCTIONS" .SH NAME Mix_FadeInMusicPos \- Play a new music object, fading in the audio, from a starting position\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3_mixer/SDL_mixer.h\(dq .PP .BI "int Mix_FadeInMusicPos(Mix_Music *music, int loops, int ms, double position); .fi .SH DESCRIPTION This will start the new music playing, much like .BR Mix_PlayMusic () will, but will start the music playing at silence and fade in to its normal volume over the specified number of milliseconds\[char46] If there is already music playing, that music will be halted and the new music object will take its place\[char46] If .BR loops is greater than zero, loop the music that many times\[char46] If .BR loops is -1, loop "infinitely" (~65000 times)\[char46] Fading music will change it's volume progressively, as if .BR Mix_VolumeMusic () was called on it (which is to say: you probably shouldn't call .BR Mix_VolumeMusic () on fading music)\[char46] This function allows the caller to start the music playback past the beginning of its audio data\[char46] You may specify a start position, in seconds, and the playback and fade-in will start there instead of with the first samples of the music\[char46] An app can specify a .BR position of 0\[char46]0 to start at the beginning of the music (or just call .BR Mix_FadeInMusic () instead)\[char46] To convert from milliseconds, divide by 1000\[char46]0\[char46] .SH FUNCTION PARAMETERS .TP .I music the new music object to play\[char46] .TP .I loops the number of times the chunk should loop, -1 to loop (not actually) infinitely\[char46] .TP .I ms the number of milliseconds to spend fading in\[char46] .TP .I position the start position within the music, in seconds, where playback should start\[char46] .SH RETURN VALUE Returns zero on success, -1 on error\[char46] .SH AVAILABILITY This function is available since SDL_mixer 3\[char46]0\[char46]0\[char46]