Scroll to navigation

Mix_Pause(3) SDL_mixer3 FUNCTIONS Mix_Pause(3)

NAME

Mix_Pause - Pause a particular channel.

SYNOPSIS

#include "SDL3_mixer/SDL_mixer.h"
void Mix_Pause(int channel);

DESCRIPTION

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.

FUNCTION PARAMETERS

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

AVAILABILITY

This function is available since SDL_mixer 3.0.0.

SDL_mixer 3.0.0 SDL_mixer