Skip to content

Commit 4dd4fda

Browse files
committed
Update SDL2_mixer consts for v2.8.1
This commit aligns the various consts found inside SDL2_mixer with the values defined by C headers.
1 parent d2f1562 commit 4dd4fda

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

units/sdl2_mixer.pas

+5-10
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ interface
6060
{* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL *}
6161
const
6262
SDL_MIXER_MAJOR_VERSION = 2;
63-
SDL_MIXER_MINOR_VERSION = 0;
64-
SDL_MIXER_PATCHLEVEL = 4;
63+
SDL_MIXER_MINOR_VERSION = 8;
64+
SDL_MIXER_PATCHLEVEL = 1;
6565

6666
{* This macro can be used to fill a version structure with the compile-time
6767
* version of the SDL_mixer library.
@@ -118,18 +118,13 @@ procedure Mix_Quit() cdecl; external MIX_LibName {$IFDEF DELPHI} {$IFDEF MACOS}
118118

119119
{* Good default values for a PC soundcard *}
120120
const
121-
MIX_DEFAULT_FREQUENCY = 22050;
121+
MIX_DEFAULT_FREQUENCY = 44100;
122122
MIX_DEFAULT_CHANNELS = 2;
123123
MIX_MAX_VOLUME = SDL2.SDL_MIX_MAXVOLUME; {* Volume of a chunk *}
124124

125125
{$IFDEF FPC}
126-
{$IF DEFINED(ENDIAN_LITTLE)}
127-
MIX_DEFAULT_FORMAT = AUDIO_S16LSB;
128-
{$ELSEIF DEFINED(ENDIAN_BIG)}
129-
MIX_DEFAULT_FORMAT = AUDIO_S16MSB;
130-
{$ELSE}
131-
{$FATAL Unable to determine endianness.}
132-
{$IFEND}
126+
// This is hidden behind IFDEF because AUDIO_S16SYS is also hidden.
127+
MIX_DEFAULT_FORMAT = SDL2.AUDIO_S16SYS;
133128
{$ENDIF}
134129

135130
{* The internal format for an audio chunk *}

0 commit comments

Comments
 (0)