Audio types have the same naming convention as other SDL endian types, e.g. [S|U][BITS][LE|BE]

Native endian types have no LE/BE suffix
This commit is contained in:
Sam Lantinga
2023-09-04 09:17:29 -07:00
parent 36b5f3e35c
commit 233789b0d1
28 changed files with 258 additions and 224 deletions

View File

@@ -2039,10 +2039,10 @@ static int WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 *
case ALAW_CODE:
case MULAW_CODE:
/* These can be easily stored in the byte order of the system. */
spec->format = SDL_AUDIO_S16SYS;
spec->format = SDL_AUDIO_S16;
break;
case IEEE_FLOAT_CODE:
spec->format = SDL_AUDIO_F32LSB;
spec->format = SDL_AUDIO_F32LE;
break;
case PCM_CODE:
switch (format->bitspersample) {
@@ -2050,11 +2050,11 @@ static int WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 *
spec->format = SDL_AUDIO_U8;
break;
case 16:
spec->format = SDL_AUDIO_S16LSB;
spec->format = SDL_AUDIO_S16LE;
break;
case 24: /* Has been shifted to 32 bits. */
case 32:
spec->format = SDL_AUDIO_S32LSB;
spec->format = SDL_AUDIO_S32LE;
break;
default:
/* Just in case something unexpected happened in the checks. */