Tao.Sdl SDK Documentation

SdlMixer.Mix_UnregisterEffect Method 

Unhook a processor from a channel

[Visual Basic]
Public Shared Function Mix_UnregisterEffect( _
   ByVal chan As Integer, _
   ByVal f As MixEffectFunctionDelegate _
) As Integer
[C#]
public static int Mix_UnregisterEffect(
   int chan,
   MixEffectFunctionDelegate f
);

Parameters

chan
Channel number to remove f from as a post processor.

Use MIX_CHANNEL_POST for the postmix stream.

f
The function to remove from channel.

Return Value

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

Remarks

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.

int Mix_UnregisterEffect(int channel, Mix_EffectFunc_t f)
            

Example

            // 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

SdlMixer Class | Tao.Sdl Namespace | Mix_RegisterEffect | Mix_UnregisterAllEffects