Hook a processor to a channel
Zero on errors, such as a nonexisting channel
The effects are put into a linked list, and always appended to the end, meaning they always work on previously registered effects output. Effects may be added multiple times in a row. Effects are cumulative this way.
int Mix_RegisterEffect(int chan, Mix_EffectFunc_t f, Mix_EffectDone_t d, void *arg)
// make a passthru processor function that does nothing...
void noEffect(int chan, void *stream, int len, void *udata)
{
// you could work with stream here...
}
...
// register noEffect as a postmix processor
if(!Mix_RegisterEffect(MIX_CHANNEL_POST, noEffect, NULL, NULL))
{
printf("Mix_RegisterEffect: %s\n", Mix_GetError());
}
SdlMixer Class | Tao.Sdl Namespace | Mix_UnregisterEffect | Mix_UnregisterAllEffects