mixFadeOutChannel function

int mixFadeOutChannel(
  1. int which,
  2. int ms
)

Halt a channel after fading it out for a specified time.

This will begin a channel fading from its current volume to silence over ms milliseconds. After that time, the channel is halted.

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

A fading channel will change it's volume progressively, as if Mix_Volume() was called on it (which is to say: you probably shouldn't call Mix_Volume() on a fading channel).

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

\param which the channel to fade out. \param ms number of milliseconds to fade before halting the channel. \returns the number of channels scheduled to fade.

\since This function is available since SDL_mixer 2.0.0.

extern DECLSPEC int SDLCALL Mix_FadeOutChannel(int which, int ms)

Implementation

int mixFadeOutChannel(int which, int ms) {
  final mixFadeOutChannelLookupFunction = libSdl2Mixer.lookupFunction<
      Int32 Function(Int32 which, Int32 ms),
      int Function(int which, int ms)>('Mix_FadeOutChannel');
  return mixFadeOutChannelLookupFunction(which, ms);
}