From: DeaDDooMER Date: Sun, 1 Dec 2019 21:30:05 +0000 (+0300) Subject: fix sdlmixer on bigendian machines (i hope fully) X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=53043481e666a99db9e626487b488d97fb9b95ad;p=d2df-sdl.git fix sdlmixer on bigendian machines (i hope fully) --- diff --git a/src/engine/e_sound_sdl.inc b/src/engine/e_sound_sdl.inc index 9436cec..afbb875 100644 --- a/src/engine/e_sound_sdl.inc +++ b/src/engine/e_sound_sdl.inc @@ -197,7 +197,7 @@ begin if (res and MIX_INIT_FLUIDSYNTH) <> 0 then e_WriteLog('SDL: FLUIDSYNTH playback is active', TMsgType.Notify); e_WriteLog(Format('SDL: initializing mixer at %d with buffer %d', [gsSDLSampleRate, gsSDLBufferSize]), TMsgType.Notify); - res := Mix_OpenAudio(gsSDLSampleRate, AUDIO_S16LSB, 2, gsSDLBufferSize); + res := Mix_OpenAudio(gsSDLSampleRate, {$IFDEF FPC_LITTLE_ENDIAN}AUDIO_S16LSB{$ELSE}AUDIO_S16MSB{$ENDIF}, 2, gsSDLBufferSize); if res = -1 then begin e_WriteLog('Error initializing SDL mixer:', TMsgType.Fatal);