فهرست منبع

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.
Ryan C. Gordon 1 سال پیش
والد
کامیت
9421a01400
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      include/SDL3/SDL_audio.h

+ 5 - 0
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.