X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_sound_sdl.inc;h=afbb8758f3658b92da93419d4f11737c80b3a87f;hb=2c147b5a7106a74252a3f71de731adff9c472070;hp=175f4743f966649b11b87f20332213900945246d;hpb=4171d8dd0b8d733da27c584616e431811bf0fdcf;p=d2df-sdl.git diff --git a/src/engine/e_sound_sdl.inc b/src/engine/e_sound_sdl.inc index 175f474..afbb875 100644 --- a/src/engine/e_sound_sdl.inc +++ b/src/engine/e_sound_sdl.inc @@ -16,7 +16,7 @@ interface uses {$IFDEF USE_MEMPOOL}mempool,{$ENDIF} - SDL2, SDL2_mixer, + SDL2, SDL2_mixer, envvars, e_log, SysUtils; type @@ -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);