Scroll to navigation

MIX_SetGroupPostMixCallback(3) SDL_mixer3 FUNCTIONS MIX_SetGroupPostMixCallback(3)

NAME

MIX_SetGroupPostMixCallback - Set a callback that fires when a mixer group has completed mixing.

SYNOPSIS

#include <SDL3_mixer/SDL_mixer.h>
bool MIX_SetGroupPostMixCallback(MIX_Group *group, MIX_GroupMixCallback cb, void *userdata);

DESCRIPTION

After all playing tracks in a mixer group have pulled in more data from their inputs, transformed it, and mixed together into a single buffer, a callback can be fired. This lets an app view the data at the last moment that it is still a part of this group. It can also change the data in any way it pleases during this callback, and the mixer will continue as if this data came directly from the group's mix buffer.

Each group has its own unique callback. Tracks that aren't in an explicit MIX_Group are mixed in an internal grouping that is not available to the app.

Passing a NULL callback here is legal; it disables this group's callback.

FUNCTION PARAMETERS

the mixing group to assign this callback to.
the function to call when the group mixes. May be NULL.
an opaque pointer provided to the callback for its own personal use.

RETURN VALUE

Returns true on success or false on failure; call SDL_GetError() for more information.

AVAILABILITY

This function is available since SDL_mixer 3.0.0.

SEE ALSO

MIX_GroupMixCallback(3type)

SDL_mixer 3.2.0 SDL_mixer