-next-
Sound

Playing music works very similarly.

Mix_PlayMusic(song, loops);


You can stop a channel at any time using Mix_HaltChannel(), and pause/unpause it with Mix_Pause() and Mix_Resume().

You can stop music using Mix_HaltMusic(), and pause/unpause and rewind it using Mix_PauseMusic(), Mix_ResumeMusic() and Mix_RewindMusic().

You can also adjust the volume of a channel (or all channels) using Mix_Volume(). Ditto for music, using Mix_VolumeMusic(). You can even alter the volume of a sample after it has been loaded using Mix_VolumeChunk().

The latest version of mixer also supports fading channels and music in and out, as well as grouping channels together.