ソースを参照

docs: warn not to destroy an SDL_AudioStream during its callback.

Fixes #15871.
Ryan C. Gordon 8 時間 前
コミット
0b692f64b0
1 ファイル変更2 行追加0 行削除
  1. 2 0
      include/SDL3/SDL_audio.h

+ 2 - 0
include/SDL3/SDL_audio.h

@@ -1854,6 +1854,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_UnlockAudioStream(SDL_AudioStream *stream);
  * appropriate, but the system goes on with the data currently available to it
  * appropriate, but the system goes on with the data currently available to it
  * if this callback does nothing.
  * if this callback does nothing.
  *
  *
+ * Do not call SDL_DestroyAudioStream() on `stream` during this callback.
+ *
  * \param stream the SDL audio stream associated with this callback.
  * \param stream the SDL audio stream associated with this callback.
  * \param additional_amount the amount of data, in bytes, that is needed right
  * \param additional_amount the amount of data, in bytes, that is needed right
  *                          now.
  *                          now.