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


Pause a particular channel.

Header File

Defined in <SDL3_mixer/SDL_mixer.h>


void Mix_Pause(int channel);

Function Parameters

int channel the channel to pause, or -1 to pause all channels.


Pausing a channel will prevent further playback of the assigned chunk but will maintain the chunk's current mixing position. When resumed, this channel will continue to mix the chunk where it left off.

A paused channel can be resumed by calling Mix_Resume().

A paused channel with an expiration will not expire while paused (the expiration countdown will be adjusted once resumed).

It is legal to halt a paused channel. Playing a new chunk on a paused channel will replace the current chunk and unpause the channel.

Specifying a channel of -1 will pause all channels. Any music is unaffected.

You may not specify MAX_CHANNEL_POST for a channel.


This function is available since SDL_mixer 3.0.0.

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.