SDL_mixer: Further updates for SDL3 audio format name changes.

From 3bcf1872d1fba3c7cf1435d62fc76c0c397823d9 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 4 Sep 2023 21:21:50 +0300
Subject: [PATCH] Further updates for SDL3 audio format name changes.

---
 include/SDL3_mixer/SDL_mixer.h | 5 +++--
 src/codecs/music_flac.c        | 2 +-
 src/codecs/music_fluidsynth.c  | 4 ++--
 src/codecs/music_gme.c         | 2 +-
 src/codecs/music_modplug.c     | 2 +-
 src/codecs/music_mpg123.c      | 6 +++---
 src/codecs/music_ogg.c         | 2 +-
 src/codecs/music_wavpack.c     | 4 ++--
 8 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/include/SDL3_mixer/SDL_mixer.h b/include/SDL3_mixer/SDL_mixer.h
index 64168d25..e2e22049 100644
--- a/include/SDL3_mixer/SDL_mixer.h
+++ b/include/SDL3_mixer/SDL_mixer.h
@@ -221,9 +221,9 @@ extern DECLSPEC void SDLCALL Mix_Quit(void);
 /* Good default values for a PC soundcard */
 #define MIX_DEFAULT_FREQUENCY   44100
 #if SDL_BYTEORDER == SDL_LIL_ENDIAN
-#define MIX_DEFAULT_FORMAT  SDL_AUDIO_S16LSB
+#define MIX_DEFAULT_FORMAT  SDL_AUDIO_S16LE
 #else
-#define MIX_DEFAULT_FORMAT  SDL_AUDIO_S16MSB
+#define MIX_DEFAULT_FORMAT  SDL_AUDIO_S16BE
 #endif
 #define MIX_DEFAULT_CHANNELS    2
 #define MIX_MAX_VOLUME          SDL_MIX_MAXVOLUME /* Volume of a chunk */
@@ -2664,6 +2664,7 @@ extern DECLSPEC void SDLCALL Mix_CloseAudio(void);
 #ifdef __cplusplus
 }
 #endif
+
 #include <SDL3/SDL_close_code.h>
 
 #endif /* SDL_MIXER_H_ */
diff --git a/src/codecs/music_flac.c b/src/codecs/music_flac.c
index 44fffb71..87f7c5f9 100644
--- a/src/codecs/music_flac.c
+++ b/src/codecs/music_flac.c
@@ -392,7 +392,7 @@ static void flac_metadata_music_cb(
 
         /* We check for NULL stream later when we get data */
         SDL_assert(!music->stream);
-        srcspec.format = SDL_AUDIO_S16SYS;
+        srcspec.format = SDL_AUDIO_S16;
         srcspec.channels = channels;
         srcspec.freq = (int)music->sample_rate;
         music->stream = SDL_CreateAudioStream(&srcspec, &music_spec);
diff --git a/src/codecs/music_fluidsynth.c b/src/codecs/music_fluidsynth.c
index 671c1d50..8801b979 100644
--- a/src/codecs/music_fluidsynth.c
+++ b/src/codecs/music_fluidsynth.c
@@ -176,7 +176,7 @@ static FLUIDSYNTH_Music *FLUIDSYNTH_LoadMusic(void *data)
     FLUIDSYNTH_Music *music;
     double samplerate; /* as set by the lib. */
     const Uint8 channels = 2;
-    int src_format = SDL_AUDIO_S16SYS;
+    int src_format = SDL_AUDIO_S16;
     void *rw_mem;
     size_t rw_size;
     int ret;
@@ -190,7 +190,7 @@ static FLUIDSYNTH_Music *FLUIDSYNTH_LoadMusic(void *data)
     music->buffer_size = 4096/*music_spec.samples*/ * sizeof(Sint16) * channels;
     music->synth_write = fluidsynth.fluid_synth_write_s16;
     if (music_spec.format & 0x0020) { /* 32 bit. */
-        src_format = SDL_AUDIO_F32SYS;
+        src_format = SDL_AUDIO_F32;
         music->buffer_size <<= 1;
         music->synth_write = fluidsynth.fluid_synth_write_float;
     }
diff --git a/src/codecs/music_gme.c b/src/codecs/music_gme.c
index 9332c555..b6b8aac6 100644
--- a/src/codecs/music_gme.c
+++ b/src/codecs/music_gme.c
@@ -223,7 +223,7 @@ static void *GME_CreateFromRW(struct SDL_RWops *src, SDL_bool freesrc)
     music->tempo = 1.0;
     music->gain = 1.0;
 
-    srcspec.format = SDL_AUDIO_S16SYS;
+    srcspec.format = SDL_AUDIO_S16;
     srcspec.channels = 2;
     srcspec.freq = music_spec.freq;
     music->stream = SDL_CreateAudioStream(&srcspec, &music_spec);
diff --git a/src/codecs/music_modplug.c b/src/codecs/music_modplug.c
index 091fb24d..1ac79116 100644
--- a/src/codecs/music_modplug.c
+++ b/src/codecs/music_modplug.c
@@ -176,7 +176,7 @@ void *MODPLUG_CreateFromRW(SDL_RWops *src, SDL_bool freesrc)
 
     music->volume = MIX_MAX_VOLUME;
 
-    srcspec.format = (settings.mBits == 8) ? SDL_AUDIO_U8 : SDL_AUDIO_S16SYS;
+    srcspec.format = (settings.mBits == 8) ? SDL_AUDIO_U8 : SDL_AUDIO_S16;
     srcspec.channels = settings.mChannels;
     srcspec.freq = settings.mFrequency;
     music->stream = SDL_CreateAudioStream(&srcspec, &music_spec);
diff --git a/src/codecs/music_mpg123.c b/src/codecs/music_mpg123.c
index e7bb02e8..f66d585b 100644
--- a/src/codecs/music_mpg123.c
+++ b/src/codecs/music_mpg123.c
@@ -158,9 +158,9 @@ static int mpg123_format_to_sdl(int fmt)
     switch (fmt) {
         case MPG123_ENC_SIGNED_8:       return SDL_AUDIO_S8;
         case MPG123_ENC_UNSIGNED_8:     return SDL_AUDIO_U8;
-        case MPG123_ENC_SIGNED_16:      return SDL_AUDIO_S16SYS;
-        case MPG123_ENC_SIGNED_32:      return SDL_AUDIO_S32SYS;
-        case MPG123_ENC_FLOAT_32:       return SDL_AUDIO_F32SYS;
+        case MPG123_ENC_SIGNED_16:      return SDL_AUDIO_S16;
+        case MPG123_ENC_SIGNED_32:      return SDL_AUDIO_S32;
+        case MPG123_ENC_FLOAT_32:       return SDL_AUDIO_F32;
         default:                        return -1;
     }
 }
diff --git a/src/codecs/music_ogg.c b/src/codecs/music_ogg.c
index ff2e2b20..ac57b8e3 100644
--- a/src/codecs/music_ogg.c
+++ b/src/codecs/music_ogg.c
@@ -211,7 +211,7 @@ static int OGG_UpdateSection(OGG_music *music)
         music->stream = NULL;
     }
 
-    srcspec.format = SDL_AUDIO_S16SYS;
+    srcspec.format = SDL_AUDIO_S16;
     srcspec.channels = vi->channels;
     srcspec.freq = (int)vi->rate;
     music->stream = SDL_CreateAudioStream(&srcspec, &music_spec);
diff --git a/src/codecs/music_wavpack.c b/src/codecs/music_wavpack.c
index bd1d1bb8..78f16b65 100644
--- a/src/codecs/music_wavpack.c
+++ b/src/codecs/music_wavpack.c
@@ -404,10 +404,10 @@ static void *WAVPACK_CreateFromRW_internal(SDL_RWops *src1, SDL_RWops *src2, SDL
         format = SDL_AUDIO_U8;
         break;
     case 16:
-        format = SDL_AUDIO_S16SYS;
+        format = SDL_AUDIO_S16;
         break;
     default:
-        format = (music->mode & MODE_FLOAT) ? SDL_AUDIO_F32SYS : SDL_AUDIO_S32SYS;
+        format = (music->mode & MODE_FLOAT) ? SDL_AUDIO_F32 : SDL_AUDIO_S32;
         break;
     }