Tao.Sdl SDK Documentation

SdlMixer.Mix_FadeOutChannel Method 

Stop playing channel after timed fade out

[Visual Basic]
Public Shared Function Mix_FadeOutChannel( _
   ByVal which As Integer, _
   ByVal ms As Integer _
) As Integer
[C#]
public static int Mix_FadeOutChannel(
   int which,
   int ms
);

Parameters

which
Channel to fade out, or -1 to fade all channels out.
ms
Milliseconds of time that the fade-out effect should take to go to silence, starting now.

Return Value

The number of channels set to fade out.

Remarks

Gradually fade out which channel over ms milliseconds starting from now. The channel will be halted after the fade out is completed. Only channels that are playing are set to fade out, including paused channels. Any callback set by Mix_ChannelFinished will be called when the channel finishes fading out.

Binds to C-function in SDL_mixer.h

int Mix_FadeOutChannel(int which, int ms)
            

Example

            // fade out all channels to finish 3 seconds from now
            printf("starting fade out of %d channels\n", Mix_FadeOutChannel(-1, 3000));
            

See Also

SdlMixer Class | Tao.Sdl Namespace | Mix_FadeInChannel | Mix_FadeInChannelTimed | Mix_FadingChannel | Mix_ChannelFinished