[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4.6.2 Mix_UnregisterEffect

int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f)

Channel number to remove f from as a post processor.
Use MIX_CHANNEL_POST for the postmix stream.
The function to remove from channel.

Remove the oldest (first found) registered effect function f from the effect list for channel. This only removes the first found occurance of that function, so it may need to be called multiple times if you added the same function multiple times, just stop removing when Mix_UnregisterEffect returns an error, to remove all occurances of f from a channel.
If the channel is active the registered effect will have its Mix_EffectDone_t function called, if it was specified in Mix_RegisterEffect.

Returns: Zero on errors, such as invalid channel, or effect function not registered on channel.

// unregister the noEffect from the postmix effects
// this removes all occurances of noEffect registered to the postmix
while(Mix_UnregisterEffect(MIX_CHANNEL_POST, noEffect));
// you may print Mix_GetError() if you want to check it.
// it should say "No such effect registered" after this loop.

See Also:
4.6.3 Mix_UnregisterAllEffects, 4.6.1 Mix_RegisterEffect

This document was generated on November, 13 2009 using texi2html