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

Mix_ExpireChannel

Change the expiration delay for a particular channel.

Header File

Defined in <SDL_mixer.h>

Syntax

int Mix_ExpireChannel(int channel, int ticks);

Function Parameters

int channel the channel to change the expiration time on.
int ticks number of milliseconds from now to let channel play before halting, -1 to not halt.

Return Value

(int) Returns the number of channels that changed expirations.

Remarks

The channel will halt after the 'ticks' milliseconds have elapsed, or remove the expiration if 'ticks' is -1.

This overrides the value passed to the fourth parameter of Mix_PlayChannelTimed().

Specifying a channel of -1 will set an expiration for all channels.

Any halted channels will have any currently-registered effects deregistered, and will call any callback specified by Mix_ChannelFinished() once the halt occurs.

Note that this function does not block for the number of ticks requested; it just schedules the chunk to expire and notes the time for the mixer to manage later, and returns immediately.

Version

This function is available since SDL_mixer 2.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.