From 90a3e68bcf30e6b37311b69bed6fe037c3bb82c6 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 5 Mar 2026 09:48:39 -0500
Subject: [PATCH] docs: Minor documentation updates to MIX_LockMixer and
MIX_UnlockMixer.
---
include/SDL3_mixer/SDL_mixer.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/SDL3_mixer/SDL_mixer.h b/include/SDL3_mixer/SDL_mixer.h
index 6ec025f1..de347ec0 100644
--- a/include/SDL3_mixer/SDL_mixer.h
+++ b/include/SDL3_mixer/SDL_mixer.h
@@ -546,6 +546,10 @@ extern SDL_DECLSPEC bool SDLCALL MIX_GetMixerFormat(MIX_Mixer *mixer, SDL_AudioS
* mixer, call MIX_PlayTrack multiple times, and then unlock again; all the
* tracks will start mixing on the same sample frame.
*
+ * Each call to this function must be paired with a call to MIX_UnlockMixer
+ * from the same thread. It is safe to lock a mixer multiple times; it remains
+ * locked until the final matching unlock call.
+ *
* Do not lock the mixer for significant amounts of time, or it can cause
* audio dropouts. Just do simply things quickly and unlock again.
*
@@ -556,6 +560,8 @@ extern SDL_DECLSPEC bool SDLCALL MIX_GetMixerFormat(MIX_Mixer *mixer, SDL_AudioS
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL_mixer 3.0.0.
+ *
+ * \sa MIX_UnlockMixer
*/
extern SDL_DECLSPEC void SDLCALL MIX_LockMixer(MIX_Mixer *mixer);
@@ -577,6 +583,8 @@ extern SDL_DECLSPEC void SDLCALL MIX_LockMixer(MIX_Mixer *mixer);
* \threadsafety It is safe to call this function from any thread.
*
* \since This function is available since SDL_mixer 3.0.0.
+ *
+ * \sa MIX_LockMixer
*/
extern SDL_DECLSPEC void SDLCALL MIX_UnlockMixer(MIX_Mixer *mixer);