MIX_DestroyTrack - Man Page

Destroy the specified track.

Synopsis

#include <SDL3_mixer/SDL_mixer.h>

void MIX_DestroyTrack(MIX_Track *track);

Description

If the track is currently playing, it will be stopped immediately, without any fadeout. If there is a callback set through MIX_SetTrackStoppedCallback(), it will _not_ be called.

If the mixer is currently mixing in another thread, this will block until it finishes. Destroying a track from the mixer thread itself (during a callback) will cause it to be destroyed as soon as this iteration of the mixer thread is not using it; in this scenario, destroying a track and then making futher changes to it is considered undefined behavior.

Destroying a NULL MIX_Track is a legal no-op.

Function Parameters

track

the track to destroy.

Thread Safety

It is safe to call this function from any thread.

Availability

This function is available since SDL_mixer 3.0.0.

Info

SDL_mixer 3.2.4 SDL_mixer3 FUNCTIONS