Type Alias sdl2_sys::SDL_AudioCallback
source · pub type SDL_AudioCallback = Option<unsafe extern "C" fn(userdata: *mut c_void, stream: *mut Uint8, len: c_int)>;
Expand description
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.
Aliased Type§
enum SDL_AudioCallback {
None,
Some(unsafe extern "C" fn(_: *mut c_void, _: *mut u8, _: i32)),
}