mixUnregisterAllEffects function

int mixUnregisterAllEffects(
  1. int channel
)

Explicitly unregister all special effect functions.

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

Note that this will also shut off some internal effect processing, since Mix_SetPanning() and others may use this API under the hood. This is called internally when a channel completes playback. Posteffects are never implicitly unregistered as they are for channels, 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.

\param channel the channel to unregister all effects on, or MIX_CHANNEL_POST. \returns zero if error (no such channel), nonzero if all effects removed. Error messages can be retrieved from Mix_GetError().

\since This function is available since SDL_mixer 2.0.0.

extern DECLSPEC int SDLCALL Mix_UnregisterAllEffects(int channel)

Implementation

int mixUnregisterAllEffects(int channel) {
  final mixUnregisterAllEffectsLookupFunction = libSdl2Mixer.lookupFunction<
      Int32 Function(Int32 channel),
      int Function(int channel)>('Mix_UnregisterAllEffects');
  return mixUnregisterAllEffectsLookupFunction(channel);
}