From 9421a01400c0f0e037f8d61756cc8efd572ffcd4 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 11 Apr 2024 08:56:10 -0400 Subject: [PATCH] SDL_AudioStreamCallback: Note that there's no _requirement_ to do anything. This is as opposed to something like the SDL2 audio callback, where you _must_ supply data or disaster occurs. --- include/SDL3/SDL_audio.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/SDL3/SDL_audio.h b/include/SDL3/SDL_audio.h index ae0b2fb380..f2e1a3d097 100644 --- a/include/SDL3/SDL_audio.h +++ b/include/SDL3/SDL_audio.h @@ -1003,6 +1003,11 @@ extern DECLSPEC int SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream); * Byte counts might be slightly overestimated due to buffering or * resampling, and may change from call to call. * + * This callback is not required to do anything. Generally this is useful + * for adding/reading data on demand, and the app will often put/get data as + * appropriate, but the system goes on with the data currently available + * to it if this callback does nothing. + * * \param stream The SDL audio stream associated with this callback. * \param additional_amount The amount of data, in bytes, that is needed right now. * \param total_amount The total amount of data requested, in bytes, that is requested or available.