[−][src]Type Definition sdl2_sys::SDL_AudioCallback
type SDL_AudioCallback = Option<unsafe extern "C" fn(userdata: *mut c_void, stream: *mut Uint8, len: c_int)>;
This function is called when the audio device needs more data.
\param userdata An application-specific parameter saved in the SDL_AudioSpec structure \param stream A pointer to the audio data buffer. \param len The length of that buffer in bytes.
Once the callback returns, the buffer will no longer be valid. Stereo samples are stored in a LRLRLR ordering.
You can choose to avoid callbacks and use SDL_QueueAudio() instead, if you like. Just open your audio device with a NULL callback.