(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_AudioCallback

This function is called when the audio device needs more data.

Header File

Defined in SDL_audio.h

Syntax

typedef void (SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 * stream, int len);

Function Parameters

userdata An application-specific parameter saved in the SDL_AudioSpec structure
stream A pointer to the audio data buffer.
len Length of stream in bytes.

CategoryAPI, CategoryAPIDatatype, CategoryAudio