SDL_AudioPostmixCallback

A callback that fires when data is about to be fed to an audio device.

This is useful for accessing the final mix, perhaps for writing a visualizer or applying a final effect to the audio data before playback.

This callback should run as quickly as possible and not block for any significant time, as this callback delays submission of data to the audio device, which can cause audio playback problems.

The postmix callback _must_ be able to handle any audio data format specified in spec, which can change between callbacks if the audio device changed. However, this only covers frequency and channel count; data is always provided here in SDL_AUDIO_F32 format.

The postmix callback runs _after_ logical device gain and audiostream gain have been applied, which is to say you can make the output data louder at this point than the gain settings would suggest.

extern (C) nothrow @nogc
alias SDL_AudioPostmixCallback = void function
(
void* userdata
,,
float* buffer
,
int buflen
)

See Also

Meta