From: DeaDDooMER Date: Wed, 13 Jul 2022 14:21:04 +0000 (+0300) Subject: al: fix 16bit wav sounds on big endian with sdl 1.2 X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=4088363b84dfd30d4a4547685eac092bb2c0598f;p=d2df-sdl.git al: fix 16bit wav sounds on big endian with sdl 1.2 --- diff --git a/src/lib/sdl/sdl.pas b/src/lib/sdl/sdl.pas index 3425ea3..ebec9ee 100644 --- a/src/lib/sdl/sdl.pas +++ b/src/lib/sdl/sdl.pas @@ -457,28 +457,24 @@ const SDL_BIG_ENDIAN = 4321; {$EXTERNALSYM SDL_BIG_ENDIAN} -{$IFDEF IA32} - +{$IFDEF FPC_LITTLE_ENDIAN} SDL_BYTEORDER = SDL_LIL_ENDIAN; +{$ELSE} + SDL_BYTEORDER = SDL_BIG_ENDIAN; +{$ENDIF} {$EXTERNALSYM SDL_BYTEORDER} + // Native audio byte ordering +{$IFDEF FPC_LITTLE_ENDIAN} + SDL_BYTEORDER = SDL_LIL_ENDIAN; AUDIO_U16SYS = AUDIO_U16LSB; -{$EXTERNALSYM AUDIO_U16SYS} AUDIO_S16SYS = AUDIO_S16LSB; -{$EXTERNALSYM AUDIO_S16SYS} - {$ELSE} - - SDL_BYTEORDER = SDL_BIG_ENDIAN; -{$EXTERNALSYM SDL_BYTEORDER} - // Native audio byte ordering AUDIO_U16SYS = AUDIO_U16MSB; -{$EXTERNALSYM AUDIO_U16SYS} AUDIO_S16SYS = AUDIO_S16MSB; -{$EXTERNALSYM AUDIO_S16SYS} - {$ENDIF} - +{$EXTERNALSYM AUDIO_U16SYS} +{$EXTERNALSYM AUDIO_S16SYS} SDL_MIX_MAXVOLUME = 128; {$EXTERNALSYM SDL_MIX_MAXVOLUME}