mixExpireChannel function

int mixExpireChannel(
  1. int channel,
  2. int ticks
)

Change the expiration delay for a particular channel.

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.

\param channel the channel to change the expiration time on. \param ticks number of milliseconds from now to let channel play before halting, -1 to not halt. \returns the number of channels that changed expirations.

\since This function is available since SDL_mixer 2.0.0.

extern DECLSPEC int SDLCALL Mix_ExpireChannel(int channel, int ticks)

Implementation

int mixExpireChannel(int channel, int ticks) {
  final mixExpireChannelLookupFunction = libSdl2Mixer.lookupFunction<
      Int32 Function(Int32 channel, Int32 ticks),
      int Function(int channel, int ticks)>('Mix_ExpireChannel');
  return mixExpireChannelLookupFunction(channel, ticks);
}