SDL Wiki
[ front page | index | search | recent changes | git repo | offline html ]
(This function is part of SDL_mixer, a separate library from SDL.)

MIX_TrackStoppedCallback

A callback that fires when a MIX_Track is stopped.

Header File

Defined in <SDL3_mixer/SDL_mixer.h>

Syntax

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

Function Parameters

userdata an opaque pointer provided by the app for its personal use.
track the track that has stopped.

Remarks

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.

Version

This datatype is available since SDL_mixer 3.0.0.

See Also


CategoryAPI, CategoryAPIDatatype, CategorySDLMixer


[ edit | delete | history | feedback | raw ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.