Scroll to navigation

Mix_UnregisterEffect(3) SDL_mixer3 FUNCTIONS Mix_UnregisterEffect(3)

NAME

Mix_UnregisterEffect - Explicitly unregister a special effect function.

SYNOPSIS

#include "SDL3_mixer/SDL_mixer.h"
int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f);

DESCRIPTION

You may not need to call this at all, unless you need to stop an effect from processing in the middle of a chunk's playback.

Posteffects are never implicitly unregistered as they are for channels (as the output stream does not have an end), but they may be explicitly unregistered through this function by specifying

MIX_CHANNEL_POST
for a channel.

Note that unlike most SDL and SDL_mixer functions, this function returns zero if there's an error, not on success. We apologize for the API design inconsistency here.

FUNCTION PARAMETERS

the channel to unregister an effect on, or MIX_CHANNEL_POST .
effect the callback stop calling in future mixing iterations.

RETURN VALUE

Returns zero if error (no such channel or effect), nonzero if removed. Error messages can be retrieved from Mix_GetError ().

AVAILABILITY

This function is available since SDL_mixer 3.0.0.

SDL_mixer 3.0.0 SDL_mixer