# HG changeset patch # User sheepluva # Date 1452630104 -3600 # Node ID 3a4026fe7c18328f9be5601d3fdf19efdbec9fc4 # Parent 9c5d9993b14b4a01b82b6a3bd4e3b342eeb4cff0 use MIX_DEFAULT_FORMAT for sound diff -r 9c5d9993b14b -r 3a4026fe7c18 hedgewars/SDLh.pas --- a/hedgewars/SDLh.pas Tue Jan 12 20:40:12 2016 +0100 +++ b/hedgewars/SDLh.pas Tue Jan 12 21:21:44 2016 +0100 @@ -88,8 +88,13 @@ SDL_ALLEVENTS = $FFFFFFFF; // dummy event type to prevent stack corruption SDL_APPINPUTFOCUS = $02; - // audio formats + // (some) audio formats from SDL_audio.h AUDIO_S16LSB = $8010; // Signed 16-bit samples, in little-endian byte order + AUDIO_S16MSB = $9010; // Signed 16-bit samples, in big-endian byte order + AUDIO_S16SYS = {$IFDEF ENDIAN_LITTLE}AUDIO_S16LSB{$ELSE}AUDIO_S16MSB{$ENDIF}; + + // default audio format from SDL_mixer.h + MIX_DEFAULT_FORMAT = AUDIO_S16SYS; SDL_BUTTON_LEFT = 1; SDL_BUTTON_MIDDLE = 2; diff -r 9c5d9993b14b -r 3a4026fe7c18 hedgewars/uSound.pas --- a/hedgewars/uSound.pas Tue Jan 12 20:40:12 2016 +0100 +++ b/hedgewars/uSound.pas Tue Jan 12 21:21:44 2016 +0100 @@ -310,7 +310,7 @@ success:= SDL_InitSubSystem(SDL_INIT_AUDIO) >= 0; if success then - success:= Mix_OpenAudio(44100, AUDIO_S16LSB, channels, 1024) = 0; + success:= Mix_OpenAudio(44100, MIX_DEFAULT_FORMAT, channels, 1024) = 0; if success then WriteLnToConsole(msgOK)