table of contents
- experimental 3.1~git20250910~d032535+ds-1
MIX_SetTrackRawCallback(3) | SDL_mixer3 FUNCTIONS | MIX_SetTrackRawCallback(3) |
NAME¶
MIX_SetTrackRawCallback - Set a callback that fires when a
MIX_Track
has initial decoded audio.
HEADER FILE¶
Defined in SDL3_mixer/SDL_mixer.h
SYNOPSIS¶
#include "SDL3_mixer/SDL_mixer.h"
bool MIX_SetTrackRawCallback(MIX_Track *track, MIX_TrackMixCallback cb, void *userdata);
DESCRIPTION¶
As a track needs to mix more data, it pulls from its input (a
MIX_Audio , an SDL_AudioStream, etc). This input might be a compressed file format, like MP3, so a little more data is uncompressed from it.
Once the track has PCM data to start operating on, it can fire a callback before _any_ changes to the raw PCM input have happened. This lets an app view the data before it has gone through transformations such as gain, 3D positioning, fading, etc. 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 input.
Each track has its own unique raw callback.
Passing a NULL callback here is legal; it disables this track's callback.
FUNCTION PARAMETERS¶
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¶
•(3), MIX_TrackMixCallback(3type), •(3), MIX_SetTrackCookedCallback(3)
SDL_mixer 3.1.0 | SDL_mixer |