.\" 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_LoadMUS: .\" https://wiki.libsdl.org/SDL_mixer/Mix_LoadMUS .\" 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_LoadMUS .\" 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_LoadMUS 3 "SDL_mixer 3.0.0" "SDL_mixer" "SDL_mixer3 FUNCTIONS" .SH NAME Mix_LoadMUS \- Load a supported audio format into a music object\[char46] .SH SYNOPSIS .nf .B #include \(dqSDL3_mixer/SDL_mixer.h\(dq .PP .BI "Mix_Music * Mix_LoadMUS(const char *file); .fi .SH DESCRIPTION SDL_mixer has two separate data structures for audio data\[char46] One it calls a "chunk," which is meant to be a file completely decoded into memory up front, and the other it calls "music" which is a file intended to be decoded on demand\[char46] Originally, simple formats like uncompressed WAV files were meant to be chunks and compressed things, like MP3s, were meant to be music, and you would stream one thing for a game's music and make repeating sound effects with the chunks\[char46] In modern times, this isn't split by format anymore, and most are interchangeable, so the question is what the app thinks is worth predecoding or not\[char46] Chunks might take more memory, but once they are loaded won't need to decode again, whereas music always needs to be decoded on the fly\[char46] Also, crucially, there are as many channels for chunks as the app can allocate, but SDL_mixer only offers a single "music" channel\[char46] When done with this music, the app should dispose of it with a call to .BR Mix_FreeMusic ()\[char46] .SH FUNCTION PARAMETERS .TP .I file a file path from where to load music data\[char46] .SH RETURN VALUE Returns a new music object, or NULL on error\[char46] .SH AVAILABILITY This function is available since SDL_mixer 3\[char46]0\[char46]0\[char46] .SH SEE ALSO .BR Mix_FreeMusic (3)