MIX_TrackStoppedCallback(3type)

NAME
MIX_TrackStoppedCallback - A callback that fires when a MIX_Track is stopped.

SYNOPSIS
#include <SDL3_mixer/SDL_mixer.h>

typedef void (SDLCALL *MIX_TrackStoppedCallback)(void *userdata, MIX_Track *track);

DESCRIPTION
This callback is fired when a track completes playback, either because it ran out of data to mix (and all loops were completed as well), or it was explicitly stopped by the app. Pausing a track will not fire this callback.

It is legal to adjust the track, including changing its input and restarting it. If this is done because it ran out of data in the middle of mixing, the mixer will start mixing the new track state in its current run without any gap in the audio.

This callback will not fire when a playing track is destroyed.

FUNCTION PARAMETERS

userdata
    an opaque pointer provided by the app for its personal use.

track
    the track that has stopped.

AVAILABILITY
This datatype is available since SDL_mixer 3.0.0.

SEE ALSO
MIX_SetTrackStoppedCallback(3)