SDL Wiki
(This function is part of SDL_mixer, a separate library from SDL.)


Free a music object.

Header File

Defined in <SDL3_mixer/SDL_mixer.h>


void Mix_FreeMusic(Mix_Music *music);

Function Parameters

Mix_Music * music the music object to free.


If this music is currently playing, it will be stopped.

If this music is in the process of fading out (via Mix_FadeOutMusic()), this function will block until the fade completes. If you need to avoid this, be sure to call Mix_HaltMusic() before freeing the music.


This function is available since SDL_mixer 3.0.0.

See Also

CategoryAPI, CategoryAPIFunction

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.