SDL: docs: warn not to destroy an SDL_AudioStream during its callback. (db6d9)

From db6d9d5c01e24d860f053cf23ab3e74ac3f4015d Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Tue, 23 Jun 2026 13:49:46 -0400
Subject: [PATCH] docs: warn not to destroy an SDL_AudioStream during its
 callback.

Fixes #15871.

(cherry picked from commit 0b692f64b034145382c0fb1eacafa6cd11aaf148)
---
 include/SDL3/SDL_audio.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/SDL3/SDL_audio.h b/include/SDL3/SDL_audio.h
index 46a73b1c90b41..1e1af26d75f02 100644
--- a/include/SDL3/SDL_audio.h
+++ b/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
  * 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 additional_amount the amount of data, in bytes, that is needed right
  *                          now.