SDL_mixer: Updated for latest wikiheaders.

From 7baa66f30930a21d8d24583fcc390dd354407f80 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Wed, 12 Jun 2024 19:01:20 -0400
Subject: [PATCH] Updated for latest wikiheaders.

---
 .wikiheaders-options |  2 ++
 include/SDL_mixer.h  | 18 +++++++++++++-----
 src/mixer.c          | 14 ++++++--------
 src/music.c          |  2 +-
 4 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/.wikiheaders-options b/.wikiheaders-options
index 1302012b..134b933d 100644
--- a/.wikiheaders-options
+++ b/.wikiheaders-options
@@ -14,3 +14,5 @@ wikiurl = https://wiki.libsdl.org/SDL_mixer
 bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
 warn_about_missing = 0
 wikipreamble = (This function is part of SDL_mixer, a separate library from SDL.)
+wikiheaderfiletext = Defined in [<%fname%>](https://github.com/libsdl-org/SDL_mixer/blob/SDL2/include/%fname%)
+manpageheaderfiletext = Defined in %fname%
diff --git a/include/SDL_mixer.h b/include/SDL_mixer.h
index f5448d4a..f6a2d110 100644
--- a/include/SDL_mixer.h
+++ b/include/SDL_mixer.h
@@ -1116,6 +1116,8 @@ extern DECLSPEC const char *SDLCALL Mix_GetMusicAlbumTag(const Mix_Music *music)
  */
 extern DECLSPEC const char *SDLCALL Mix_GetMusicCopyrightTag(const Mix_Music *music);
 
+typedef void (SDLCALL *Mix_MixCallback)(void *udata, Uint8 *stream, int len);
+
 /**
  * Set a function that is called after all mixing is performed.
  *
@@ -1152,7 +1154,7 @@ extern DECLSPEC const char *SDLCALL Mix_GetMusicCopyrightTag(const Mix_Music *mu
  *
  * \sa Mix_HookMusic
  */
-extern DECLSPEC void SDLCALL Mix_SetPostMix(void (SDLCALL *mix_func)(void *udata, Uint8 *stream, int len), void *arg);
+extern DECLSPEC void SDLCALL Mix_SetPostMix(Mix_MixCallback mix_func, void *arg);
 
 /**
  * Add your own music player or additional mixer function.
@@ -1198,7 +1200,9 @@ extern DECLSPEC void SDLCALL Mix_SetPostMix(void (SDLCALL *mix_func)(void *udata
  *
  * \sa Mix_SetPostMix
  */
-extern DECLSPEC void SDLCALL Mix_HookMusic(void (SDLCALL *mix_func)(void *udata, Uint8 *stream, int len), void *arg);
+extern DECLSPEC void SDLCALL Mix_HookMusic(Mix_MixCallback mix_func, void *arg);
+
+typedef void (SDLCALL *Mix_MusicFinishedCallback)(void);
 
 /**
  * Set a callback that runs when a music object has stopped playing.
@@ -1223,7 +1227,7 @@ extern DECLSPEC void SDLCALL Mix_HookMusic(void (SDLCALL *mix_func)(void *udata,
  *
  * \since This function is available since SDL_mixer 2.0.0.
  */
-extern DECLSPEC void SDLCALL Mix_HookMusicFinished(void (SDLCALL *music_finished)(void));
+extern DECLSPEC void SDLCALL Mix_HookMusicFinished(Mix_MusicFinishedCallback music_finished);
 
 /**
  * Get a pointer to the user data for the current music hook.
@@ -1237,6 +1241,8 @@ extern DECLSPEC void SDLCALL Mix_HookMusicFinished(void (SDLCALL *music_finished
  */
 extern DECLSPEC void * SDLCALL Mix_GetMusicHookData(void);
 
+typedef void (SDLCALL *Mix_ChannelFinishedCallback)(int channel);
+
 /**
  * Set a callback that runs when a channel has finished playing.
  *
@@ -1257,7 +1263,7 @@ extern DECLSPEC void * SDLCALL Mix_GetMusicHookData(void);
  *
  * \since This function is available since SDL_mixer 2.0.0.
  */
-extern DECLSPEC void SDLCALL Mix_ChannelFinished(void (SDLCALL *channel_finished)(int channel));
+extern DECLSPEC void SDLCALL Mix_ChannelFinished(Mix_ChannelFinishedCallback channel_finished);
 
 
 #define MIX_CHANNEL_POST  (-2)
@@ -2672,6 +2678,8 @@ extern DECLSPEC int SDLCALL Mix_SetSoundFonts(const char *paths);
  */
 extern DECLSPEC const char* SDLCALL Mix_GetSoundFonts(void);
 
+typedef int (SDLCALL *Mix_EachSoundFontCallback)(const char*, void*);
+
 /**
  * Iterate SoundFonts paths to use by supported MIDI backends.
  *
@@ -2697,7 +2705,7 @@ extern DECLSPEC const char* SDLCALL Mix_GetSoundFonts(void);
  *
  * \sa Mix_GetSoundFonts
  */
-extern DECLSPEC int SDLCALL Mix_EachSoundFont(int (SDLCALL *function)(const char*, void*), void *data);
+extern DECLSPEC int SDLCALL Mix_EachSoundFont(Mix_EachSoundFontCallback function, void *data);
 
 /**
  * Set full path of the Timidity config file.
diff --git a/src/mixer.c b/src/mixer.c
index 9d038d71..53381383 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -96,14 +96,14 @@ static int reserved_channels = 0;
 
 
 /* Support for hooking into the mixer callback system */
-static void (SDLCALL *mix_postmix)(void *udata, Uint8 *stream, int len) = NULL;
+static Mix_MixCallback mix_postmix = NULL;
 static void *mix_postmix_data = NULL;
 
 /* rcg07062001 callback to alert when channels are done playing. */
-static void (SDLCALL *channel_done_callback)(int channel) = NULL;
+static Mix_ChannelFinishedCallback channel_done_callback = NULL;
 
 /* Support for user defined music functions */
-static void (SDLCALL *mix_music)(void *udata, Uint8 *stream, int len) = music_mixer;
+static Mix_MixCallback mix_music = music_mixer;
 static void *music_data = NULL;
 
 /* rcg06042009 report available decoders at runtime. */
@@ -1006,8 +1006,7 @@ void Mix_FreeChunk(Mix_Chunk *chunk)
    This can be used to provide real-time visual display of the audio stream
    or add a custom mixer filter for the stream data.
 */
-void Mix_SetPostMix(void (SDLCALL *mix_func)
-                    (void *udata, Uint8 *stream, int len), void *arg)
+void Mix_SetPostMix(Mix_MixCallback mix_func, void *arg)
 {
     Mix_LockAudio();
     mix_postmix_data = arg;
@@ -1018,8 +1017,7 @@ void Mix_SetPostMix(void (SDLCALL *mix_func)
 /* Add your own music player or mixer function.
    If 'mix_func' is NULL, the default music player is re-enabled.
  */
-void Mix_HookMusic(void (SDLCALL *mix_func)(void *udata, Uint8 *stream, int len),
-                                                                void *arg)
+void Mix_HookMusic(Mix_MixCallback mix_func, void *arg)
 {
     Mix_LockAudio();
     if (mix_func != NULL) {
@@ -1037,7 +1035,7 @@ void *Mix_GetMusicHookData(void)
     return music_data;
 }
 
-void Mix_ChannelFinished(void (SDLCALL *channel_finished)(int channel))
+void Mix_ChannelFinished(Mix_ChannelFinishedCallback channel_finished)
 {
     Mix_LockAudio();
     channel_done_callback = channel_finished;
diff --git a/src/music.c b/src/music.c
index cbaafed6..0916a7cf 100644
--- a/src/music.c
+++ b/src/music.c
@@ -1544,7 +1544,7 @@ const char* Mix_GetSoundFonts(void)
     return NULL;
 }
 
-int Mix_EachSoundFont(int (SDLCALL *function)(const char*, void*), void *data)
+int Mix_EachSoundFont(Mix_EachSoundFontCallback function, void *data)
 {
     char *context, *path, *paths;
     const char* cpaths = Mix_GetSoundFonts();