SDL_mixer: TrackStopped: added a FIXME

From 96572c30daaef68162ac08c0ef84c54f0f345e34 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 18 May 2026 22:44:32 -0400
Subject: [PATCH] TrackStopped: added a FIXME

---
 src/SDL_mixer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/SDL_mixer.c b/src/SDL_mixer.c
index a042f422..dcb5ce28 100644
--- a/src/SDL_mixer.c
+++ b/src/SDL_mixer.c
@@ -233,7 +233,7 @@ static void TrackStopped(MIX_Track *track)
         SDL_assert(track->fire_and_forget_next == NULL);  // shouldn't be in the list at all right now.
         MIX_SetTrackAudio(track, NULL);
         MIX_Mixer *mixer = track->mixer;
-        LockMixer(mixer);
+        LockMixer(mixer);  // !!! FIXME: this locks the mixer after the track; everything else locks in the other order! But StopTrack() is the only place outside the mixer thread (which holds both locks already) that calls this, and it shouldn't be able to call it for fire-and-forget tracks. Clean this up or at least document this better.
         track->fire_and_forget_next = mixer->fire_and_forget_pool;
         mixer->fire_and_forget_pool = track;
         UnlockMixer(mixer);