SDL_mixer: decoders: Mark all the decoders' implementation functions static.

From 7370a32e3b4f372e01c4b3cc26c95c9f18dc26f6 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 24 Jul 2025 11:15:37 -0400
Subject: [PATCH] decoders: Mark all the decoders' implementation functions
 static.

---
 src/decoder_flac.c       | 12 ++++++------
 src/decoder_fluidsynth.c | 10 +++++-----
 src/decoder_gme.c        | 10 +++++-----
 src/decoder_mpg123.c     | 10 +++++-----
 src/decoder_opus.c       | 12 ++++++------
 src/decoder_raw.c        | 10 +++++-----
 src/decoder_stb_vorbis.c | 13 ++++++-------
 src/decoder_timidity.c   | 10 +++++-----
 src/decoder_voc.c        | 10 +++++-----
 src/decoder_vorbis.c     | 12 ++++++------
 src/decoder_wavpack.c    | 10 +++++-----
 src/decoder_xmp.c        | 10 +++++-----
 12 files changed, 64 insertions(+), 65 deletions(-)

diff --git a/src/decoder_flac.c b/src/decoder_flac.c
index 46944f20..4bb7b008 100644
--- a/src/decoder_flac.c
+++ b/src/decoder_flac.c
@@ -126,7 +126,7 @@ static FLAC__StreamDecoderWriteStatus FLAC_IoWriteNoOp(const FLAC__StreamDecoder
     return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;  // we don't need this data at this moment.
 }
 
-bool SDLCALL FLAC_seek(void *track_userdata, Uint64 frame);
+static bool SDLCALL FLAC_seek(void *track_userdata, Uint64 frame);
 
 static FLAC__StreamDecoderWriteStatus FLAC_IoWrite(const FLAC__StreamDecoder *decoder, const FLAC__Frame *frame, const FLAC__int32 *const buffer[], void *userdata)
 {
@@ -382,7 +382,7 @@ static bool SDLCALL FLAC_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_P
     return true;
 }
 
-bool SDLCALL FLAC_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL FLAC_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     FLAC_TrackData *tdata = (FLAC_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -426,7 +426,7 @@ bool SDLCALL FLAC_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_A
     return true;
 }
 
-bool SDLCALL FLAC_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL FLAC_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     FLAC_TrackData *tdata = (FLAC_TrackData *) track_userdata;
     tdata->stream = stream;
@@ -440,7 +440,7 @@ bool SDLCALL FLAC_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;
 }
 
-bool SDLCALL FLAC_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL FLAC_seek(void *track_userdata, Uint64 frame)
 {
     FLAC_TrackData *tdata = (FLAC_TrackData *) track_userdata;
     const MIX_OggLoop *loop = &tdata->adata->loop;
@@ -475,7 +475,7 @@ bool SDLCALL FLAC_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL FLAC_quit_track(void *track_userdata)
+static void SDLCALL FLAC_quit_track(void *track_userdata)
 {
     FLAC_TrackData *tdata = (FLAC_TrackData *) track_userdata;
     tdata->stream = NULL;
@@ -485,7 +485,7 @@ void SDLCALL FLAC_quit_track(void *track_userdata)
     SDL_free(tdata);
 }
 
-void SDLCALL FLAC_quit_audio(void *audio_userdata)
+static void SDLCALL FLAC_quit_audio(void *audio_userdata)
 {
     FLAC_AudioData *adata = (FLAC_AudioData *) audio_userdata;
     SDL_free(adata);
diff --git a/src/decoder_fluidsynth.c b/src/decoder_fluidsynth.c
index 0c07c3e1..f0089590 100644
--- a/src/decoder_fluidsynth.c
+++ b/src/decoder_fluidsynth.c
@@ -212,7 +212,7 @@ static fluid_long_long_t SoundFontTell(void *handle)
 }
 
 
-bool SDLCALL FLUIDSYNTH_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL FLUIDSYNTH_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     FLUIDSYNTH_TrackData *tdata = (FLUIDSYNTH_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -315,7 +315,7 @@ bool SDLCALL FLUIDSYNTH_init_track(void *audio_userdata, SDL_IOStream *io, const
     return false;
 }
 
-bool SDLCALL FLUIDSYNTH_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL FLUIDSYNTH_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     FLUIDSYNTH_TrackData *tdata = (FLUIDSYNTH_TrackData *) track_userdata;
 
@@ -332,7 +332,7 @@ bool SDLCALL FLUIDSYNTH_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;
 }
 
-bool SDLCALL FLUIDSYNTH_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL FLUIDSYNTH_seek(void *track_userdata, Uint64 frame)
 {
 #if (FLUIDSYNTH_VERSION_MAJOR < 2)
     return SDL_Unsupported();
@@ -345,7 +345,7 @@ bool SDLCALL FLUIDSYNTH_seek(void *track_userdata, Uint64 frame)
 #endif
 }
 
-void SDLCALL FLUIDSYNTH_quit_track(void *track_userdata)
+static void SDLCALL FLUIDSYNTH_quit_track(void *track_userdata)
 {
     FLUIDSYNTH_TrackData *tdata = (FLUIDSYNTH_TrackData *) track_userdata;
     fluidsynth.fluid_player_stop(tdata->player);
@@ -355,7 +355,7 @@ void SDLCALL FLUIDSYNTH_quit_track(void *track_userdata)
     SDL_free(tdata);
 }
 
-void SDLCALL FLUIDSYNTH_quit_audio(void *audio_userdata)
+static void SDLCALL FLUIDSYNTH_quit_audio(void *audio_userdata)
 {
     FLUIDSYNTH_AudioData *adata = (FLUIDSYNTH_AudioData *) audio_userdata;
     SDL_free((void *) adata->sfdata);
diff --git a/src/decoder_gme.c b/src/decoder_gme.c
index e342623d..13bbb2a7 100644
--- a/src/decoder_gme.c
+++ b/src/decoder_gme.c
@@ -129,7 +129,7 @@ static bool SDLCALL GME_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_Pr
     return true;
 }
 
-bool SDLCALL GME_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL GME_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 
@@ -167,7 +167,7 @@ bool SDLCALL GME_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_Au
     return true;
 }
 
-bool SDLCALL GME_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL GME_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     Music_Emu *emu = (Music_Emu *) track_userdata;
     if (gme.gme_track_ended(emu)) {
@@ -185,20 +185,20 @@ bool SDLCALL GME_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;  // had more data to decode.
 }
 
-bool SDLCALL GME_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL GME_seek(void *track_userdata, Uint64 frame)
 {
     Music_Emu *emu = (Music_Emu *) track_userdata;
     gme_err_t err = gme.gme_seek_samples(emu, (int) frame);
     return err ? SDL_SetError("gme_seek_samples failed: %s", err) : true;
 }
 
-void SDLCALL GME_quit_track(void *track_userdata)
+static void SDLCALL GME_quit_track(void *track_userdata)
 {
     Music_Emu *emu = (Music_Emu *) track_userdata;
     gme.gme_delete(emu);
 }
 
-void SDLCALL GME_quit_audio(void *audio_userdata)
+static void SDLCALL GME_quit_audio(void *audio_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 }
diff --git a/src/decoder_mpg123.c b/src/decoder_mpg123.c
index 59a3efee..b811265f 100644
--- a/src/decoder_mpg123.c
+++ b/src/decoder_mpg123.c
@@ -317,7 +317,7 @@ static bool SDLCALL MPG123_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL
     return false;
 }
 
-bool SDLCALL MPG123_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL MPG123_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 
@@ -379,7 +379,7 @@ bool SDLCALL MPG123_init_track(void *audio_userdata, SDL_IOStream *io, const SDL
     return true;
 }
 
-bool SDLCALL MPG123_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL MPG123_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     mpg123_handle *handle = (mpg123_handle *) track_userdata;
     SDL_AudioSpec spec;
@@ -420,7 +420,7 @@ bool SDLCALL MPG123_decode(void *track_userdata, SDL_AudioStream *stream)
     return (result == MPG123_OK);
 }
 
-bool SDLCALL MPG123_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL MPG123_seek(void *track_userdata, Uint64 frame)
 {
     mpg123_handle *handle = (mpg123_handle *) track_userdata;
     #if (MPG123_API_VERSION >= 49)
@@ -431,14 +431,14 @@ bool SDLCALL MPG123_seek(void *track_userdata, Uint64 frame)
     return (rc < 0) ? SDL_SetError("mpg123_seek:%s", mpg_err(handle, rc)) : true;
 }
 
-void SDLCALL MPG123_quit_track(void *track_userdata)
+static void SDLCALL MPG123_quit_track(void *track_userdata)
 {
     mpg123_handle *handle = (mpg123_handle *) track_userdata;
     mpg123.mpg123_close(handle);
     mpg123.mpg123_delete(handle);
 }
 
-void SDLCALL MPG123_quit_audio(void *audio_userdata)
+static void SDLCALL MPG123_quit_audio(void *audio_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 }
diff --git a/src/decoder_opus.c b/src/decoder_opus.c
index 3381f521..f85be7c0 100644
--- a/src/decoder_opus.c
+++ b/src/decoder_opus.c
@@ -189,7 +189,7 @@ static bool SDLCALL OPUS_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_P
     return true;
 }
 
-bool SDLCALL OPUS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL OPUS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     OPUS_TrackData *tdata = (OPUS_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -216,9 +216,9 @@ bool SDLCALL OPUS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_A
     return true;
 }
 
-bool SDLCALL OPUS_seek(void *track_userdata, Uint64 frame);
+static bool SDLCALL OPUS_seek(void *track_userdata, Uint64 frame);
 
-bool SDLCALL OPUS_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL OPUS_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     OPUS_TrackData *tdata = (OPUS_TrackData *) track_userdata;
     int bitstream = tdata->current_bitstream;
@@ -296,7 +296,7 @@ bool SDLCALL OPUS_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;  // had more data to decode.
 }
 
-bool SDLCALL OPUS_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL OPUS_seek(void *track_userdata, Uint64 frame)
 {
     OPUS_TrackData *tdata = (OPUS_TrackData *) track_userdata;
     const MIX_OggLoop *loop = &tdata->adata->loop;
@@ -330,14 +330,14 @@ bool SDLCALL OPUS_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL OPUS_quit_track(void *track_userdata)
+static void SDLCALL OPUS_quit_track(void *track_userdata)
 {
     OPUS_TrackData *tdata = (OPUS_TrackData *) track_userdata;
     opus.op_free(tdata->of);
     SDL_free(tdata);
 }
 
-void SDLCALL OPUS_quit_audio(void *audio_userdata)
+static void SDLCALL OPUS_quit_audio(void *audio_userdata)
 {
     OPUS_AudioData *adata = (OPUS_AudioData *) audio_userdata;
     SDL_free(adata);
diff --git a/src/decoder_raw.c b/src/decoder_raw.c
index b3504628..ebf9dccf 100644
--- a/src/decoder_raw.c
+++ b/src/decoder_raw.c
@@ -64,7 +64,7 @@ static bool SDLCALL RAW_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_Pr
     return true;
 }
 
-bool SDLCALL RAW_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL RAW_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
     RAW_TrackData *tdata = (RAW_TrackData *) SDL_calloc(1, sizeof (*tdata));
@@ -81,7 +81,7 @@ bool SDLCALL RAW_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_Au
     return true;
 }
 
-bool SDLCALL RAW_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL RAW_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     RAW_TrackData *tdata = (RAW_TrackData *) track_userdata;
     Uint8 buffer[256];
@@ -109,7 +109,7 @@ bool SDLCALL RAW_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;
 }
 
-bool SDLCALL RAW_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL RAW_seek(void *track_userdata, Uint64 frame)
 {
     RAW_TrackData *tdata = (RAW_TrackData *) track_userdata;
     const Sint64 offset = (Sint64) (frame * tdata->framesize);
@@ -120,12 +120,12 @@ bool SDLCALL RAW_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL RAW_quit_track(void *track_userdata)
+static void SDLCALL RAW_quit_track(void *track_userdata)
 {
     SDL_free(track_userdata);
 }
 
-void SDLCALL RAW_quit_audio(void *audio_userdata)
+static void SDLCALL RAW_quit_audio(void *audio_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 }
diff --git a/src/decoder_stb_vorbis.c b/src/decoder_stb_vorbis.c
index 21380b43..8e1be98b 100644
--- a/src/decoder_stb_vorbis.c
+++ b/src/decoder_stb_vorbis.c
@@ -185,7 +185,7 @@ static bool SDLCALL STBVORBIS_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec,
     return true;
 }
 
-bool SDLCALL STBVORBIS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL STBVORBIS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     STBVORBIS_TrackData *tdata = (STBVORBIS_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -207,10 +207,9 @@ bool SDLCALL STBVORBIS_init_track(void *audio_userdata, SDL_IOStream *io, const
     return true;
 }
 
-// !!! FIXME: why aren't these marked static?
-bool SDLCALL STBVORBIS_seek(void *track_userdata, Uint64 frame);
+static bool SDLCALL STBVORBIS_seek(void *track_userdata, Uint64 frame);
 
-bool SDLCALL STBVORBIS_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL STBVORBIS_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     STBVORBIS_TrackData *tdata = (STBVORBIS_TrackData *) track_userdata;
 
@@ -296,7 +295,7 @@ bool SDLCALL STBVORBIS_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;  // had more data to decode.
 }
 
-bool SDLCALL STBVORBIS_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL STBVORBIS_seek(void *track_userdata, Uint64 frame)
 {
     STBVORBIS_TrackData *tdata = (STBVORBIS_TrackData *) track_userdata;
     const MIX_OggLoop *loop = &tdata->adata->loop;
@@ -330,14 +329,14 @@ bool SDLCALL STBVORBIS_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL STBVORBIS_quit_track(void *track_userdata)
+static void SDLCALL STBVORBIS_quit_track(void *track_userdata)
 {
     STBVORBIS_TrackData *tdata = (STBVORBIS_TrackData *) track_userdata;
     stb_vorbis_close(tdata->vorbis);
     SDL_free(tdata);
 }
 
-void SDLCALL STBVORBIS_quit_audio(void *audio_userdata)
+static void SDLCALL STBVORBIS_quit_audio(void *audio_userdata)
 {
     SDL_free(audio_userdata);
 }
diff --git a/src/decoder_timidity.c b/src/decoder_timidity.c
index dfc5e10f..29ef6b34 100644
--- a/src/decoder_timidity.c
+++ b/src/decoder_timidity.c
@@ -99,7 +99,7 @@ static bool SDLCALL TIMIDITY_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, S
     return true;
 }
 
-bool SDLCALL TIMIDITY_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL TIMIDITY_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
     TIMIDITY_TrackData *tdata = (TIMIDITY_TrackData *) SDL_calloc(1, sizeof (*tdata));
@@ -122,7 +122,7 @@ bool SDLCALL TIMIDITY_init_track(void *audio_userdata, SDL_IOStream *io, const S
     return true;
 }
 
-bool SDLCALL TIMIDITY_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL TIMIDITY_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     TIMIDITY_TrackData *tdata = (TIMIDITY_TrackData *) track_userdata;
     //Sint32 samples[256];  // !!! FIXME: there's a hardcoded thing about buffer_size in our copy of timidity that needs to be fixed; it's hardcoded at the moment, so we use tdata->samples.
@@ -135,7 +135,7 @@ bool SDLCALL TIMIDITY_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;
 }
 
-bool SDLCALL TIMIDITY_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL TIMIDITY_seek(void *track_userdata, Uint64 frame)
 {
     TIMIDITY_TrackData *tdata = (TIMIDITY_TrackData *) track_userdata;
     const Uint32 ticks = (Uint32) MIX_FramesToMS(tdata->freq, frame);
@@ -143,7 +143,7 @@ bool SDLCALL TIMIDITY_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL TIMIDITY_quit_track(void *track_userdata)
+static void SDLCALL TIMIDITY_quit_track(void *track_userdata)
 {
     TIMIDITY_TrackData *tdata = (TIMIDITY_TrackData *) track_userdata;
     Timidity_Stop(tdata->song);
@@ -151,7 +151,7 @@ void SDLCALL TIMIDITY_quit_track(void *track_userdata)
     SDL_free(tdata);
 }
 
-void SDLCALL TIMIDITY_quit_audio(void *audio_userdata)
+static void SDLCALL TIMIDITY_quit_audio(void *audio_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 }
diff --git a/src/decoder_voc.c b/src/decoder_voc.c
index bda76d15..18fb38ca 100644
--- a/src/decoder_voc.c
+++ b/src/decoder_voc.c
@@ -405,7 +405,7 @@ static bool SDLCALL VOC_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_Pr
     return true;
 }
 
-bool SDLCALL VOC_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **userdata)
+static bool SDLCALL VOC_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **userdata)
 {
     VOC_TrackData *tdata = (VOC_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -422,7 +422,7 @@ bool SDLCALL VOC_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_Au
     return true;
 }
 
-bool SDLCALL VOC_decode(void *userdata, SDL_AudioStream *stream)
+static bool SDLCALL VOC_decode(void *userdata, SDL_AudioStream *stream)
 {
     VOC_TrackData *tdata = (VOC_TrackData *) userdata;
 
@@ -500,7 +500,7 @@ bool SDLCALL VOC_decode(void *userdata, SDL_AudioStream *stream)
     return true;
 }
 
-bool SDLCALL VOC_seek(void *userdata, Uint64 frame)
+static bool SDLCALL VOC_seek(void *userdata, Uint64 frame)
 {
     VOC_TrackData *tdata = (VOC_TrackData *) userdata;
     VOC_TrackData cpy;
@@ -565,13 +565,13 @@ bool SDLCALL VOC_seek(void *userdata, Uint64 frame)
     return false;
 }
 
-void SDLCALL VOC_quit_track(void *userdata)
+static void SDLCALL VOC_quit_track(void *userdata)
 {
     VOC_TrackData *tdata = (VOC_TrackData *) userdata;
     SDL_free(tdata);
 }
 
-void SDLCALL VOC_quit_audio(void *audio_userdata)
+static void SDLCALL VOC_quit_audio(void *audio_userdata)
 {
     VOC_AudioData *tdata = (VOC_AudioData *) audio_userdata;
     SDL_free(tdata->blocks);
diff --git a/src/decoder_vorbis.c b/src/decoder_vorbis.c
index 36f9ea0a..6678aa3b 100644
--- a/src/decoder_vorbis.c
+++ b/src/decoder_vorbis.c
@@ -211,7 +211,7 @@ static bool SDLCALL VORBIS_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL
     return true;
 }
 
-bool SDLCALL VORBIS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL VORBIS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     VORBIS_TrackData *tdata = (VORBIS_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -238,9 +238,9 @@ bool SDLCALL VORBIS_init_track(void *audio_userdata, SDL_IOStream *io, const SDL
     return true;
 }
 
-bool SDLCALL VORBIS_seek(void *track_userdata, Uint64 frame);
+static bool SDLCALL VORBIS_seek(void *track_userdata, Uint64 frame);
 
-bool SDLCALL VORBIS_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL VORBIS_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     VORBIS_TrackData *tdata = (VORBIS_TrackData *) track_userdata;
     int bitstream = tdata->current_bitstream;
@@ -332,7 +332,7 @@ bool SDLCALL VORBIS_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;  // had more data to decode.
 }
 
-bool SDLCALL VORBIS_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL VORBIS_seek(void *track_userdata, Uint64 frame)
 {
     VORBIS_TrackData *tdata = (VORBIS_TrackData *) track_userdata;
     const MIX_OggLoop *loop = &tdata->adata->loop;
@@ -366,14 +366,14 @@ bool SDLCALL VORBIS_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL VORBIS_quit_track(void *track_userdata)
+static void SDLCALL VORBIS_quit_track(void *track_userdata)
 {
     VORBIS_TrackData *tdata = (VORBIS_TrackData *) track_userdata;
     vorbis.ov_clear(&tdata->vf);
     SDL_free(tdata);
 }
 
-void SDLCALL VORBIS_quit_audio(void *audio_userdata)
+static void SDLCALL VORBIS_quit_audio(void *audio_userdata)
 {
     SDL_free(audio_userdata);
 }
diff --git a/src/decoder_wavpack.c b/src/decoder_wavpack.c
index 85b040ee..709e1ea7 100644
--- a/src/decoder_wavpack.c
+++ b/src/decoder_wavpack.c
@@ -475,7 +475,7 @@ static bool SDLCALL WAVPACK_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SD
     return false;
 }
 
-bool SDLCALL WAVPACK_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL WAVPACK_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     WAVPACK_TrackData *tdata = (WAVPACK_TrackData *) SDL_calloc(1, sizeof (*tdata));
     if (!tdata) {
@@ -526,7 +526,7 @@ bool SDLCALL WAVPACK_init_track(void *audio_userdata, SDL_IOStream *io, const SD
     return false;
 }
 
-bool SDLCALL WAVPACK_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL WAVPACK_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     WAVPACK_TrackData *tdata = (WAVPACK_TrackData *) track_userdata;
     const WAVPACK_AudioData *adata = tdata->adata;
@@ -574,7 +574,7 @@ bool SDLCALL WAVPACK_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;
 }
 
-bool SDLCALL WAVPACK_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL WAVPACK_seek(void *track_userdata, Uint64 frame)
 {
     WAVPACK_TrackData *tdata = (WAVPACK_TrackData *) track_userdata;
     const int success =
@@ -596,7 +596,7 @@ bool SDLCALL WAVPACK_seek(void *track_userdata, Uint64 frame)
     return true;
 }
 
-void SDLCALL WAVPACK_quit_track(void *track_userdata)
+static void SDLCALL WAVPACK_quit_track(void *track_userdata)
 {
     WAVPACK_TrackData *tdata = (WAVPACK_TrackData *) track_userdata;
 
@@ -610,7 +610,7 @@ void SDLCALL WAVPACK_quit_track(void *track_userdata)
     SDL_free(tdata);
 }
 
-void SDLCALL WAVPACK_quit_audio(void *audio_userdata)
+static void SDLCALL WAVPACK_quit_audio(void *audio_userdata)
 {
     WAVPACK_AudioData *adata = (WAVPACK_AudioData *) audio_userdata;
     SDL_free((void *) adata->wvcdata);
diff --git a/src/decoder_xmp.c b/src/decoder_xmp.c
index 1eb04bd2..282b3391 100644
--- a/src/decoder_xmp.c
+++ b/src/decoder_xmp.c
@@ -194,7 +194,7 @@ static bool SDLCALL XMP_init_audio(SDL_IOStream *io, SDL_AudioSpec *spec, SDL_Pr
     return true;
 }
 
-bool SDLCALL XMP_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
+static bool SDLCALL XMP_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_AudioSpec *spec, SDL_PropertiesID props, void **track_userdata)
 {
     SDL_assert(audio_userdata == NULL);  // no state.
 
@@ -233,7 +233,7 @@ bool SDLCALL XMP_init_track(void *audio_userdata, SDL_IOStream *io, const SDL_Au
     return true;
 }
 
-bool SDLCALL XMP_decode(void *track_userdata, SDL_AudioStream *stream)
+static bool SDLCALL XMP_decode(void *track_userdata, SDL_AudioStream *stream)
 {
     XMP_TrackData *tdata = (XMP_TrackData *) track_userdata;
 
@@ -253,14 +253,14 @@ bool SDLCALL XMP_decode(void *track_userdata, SDL_AudioStream *stream)
     return true;  // had more data to decode.
 }
 
-bool SDLCALL XMP_seek(void *track_userdata, Uint64 frame)
+static bool SDLCALL XMP_seek(void *track_userdata, Uint64 frame)
 {
     XMP_TrackData *tdata = (XMP_TrackData *) track_userdata;
     const int err = libxmp.xmp_seek_time(tdata->ctx, (int) MIX_FramesToMS(tdata->freq, frame));
     return err ? SetLibXmpError("xmp_seek_time", err) : true;
 }
 
-void SDLCALL XMP_quit_track(void *track_userdata)
+static void SDLCALL XMP_quit_track(void *track_userdata)
 {
     XMP_TrackData *tdata = (XMP_TrackData *) track_userdata;
     libxmp.xmp_stop_module(tdata->ctx);
@@ -270,7 +270,7 @@ void SDLCALL XMP_quit_track(void *track_userdata)
     SDL_free(tdata);
 }
 
-void SDLCALL XMP_quit_audio(void *audio_userdata)
+static void SDLCALL XMP_quit_audio(void *audio_userdata)
 {
     SDL_assert(audio_userdata == NULL);   // no state.
 }