@@ -82,29 +82,29 @@ procedure MIX_VERSION(Out X: TSDL_Version);
82
82
*}
83
83
function Mix_Linked_Version : PSDL_Version cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_Linked_Version' { $ENDIF} { $ENDIF} ;
84
84
85
- const
86
- MIX_INIT_FLAC = $00000001 ;
87
- MIX_INIT_MOD = $00000002 ;
88
- MIX_INIT_MP3 = $00000008 ;
89
- MIX_INIT_OGG = $00000010 ;
90
- MIX_INIT_MID = $00000020 ;
91
- MIX_INIT_OPUS = $00000040 ;
92
- MIX_INIT_WAVPACK = $00000080 ;
93
-
94
- { // Removed in SDL2_mixer 2.0.2
95
- MIX_INIT_MODPLUG = $00000004;
96
- MIX_INIT_FLUIDSYNTH = $00000020;
97
- }
98
85
type
99
- PPMIX_InitFlags = ^PMIX_InitFlags;
100
- PMIX_InitFlags = ^TMIX_InitFlags;
101
- TMIX_InitFlags = cint;
86
+ PPMix_InitFlags = ^PMix_InitFlags;
87
+ PMix_InitFlags = ^TMix_InitFlags;
88
+ TMix_InitFlags = type cint;
89
+
90
+ const
91
+ MIX_INIT_FLAC = TMix_InitFlags($00000001 );
92
+ MIX_INIT_MOD = TMix_InitFlags($00000002 );
93
+ MIX_INIT_MP3 = TMix_InitFlags($00000008 );
94
+ MIX_INIT_OGG = TMix_InitFlags($00000010 );
95
+ MIX_INIT_MID = TMix_InitFlags($00000020 );
96
+ MIX_INIT_OPUS = TMix_InitFlags($00000040 );
97
+ MIX_INIT_WAVPACK = TMix_InitFlags($00000080 );
98
+
99
+ // Removed in SDL2_mixer 2.0.2:
100
+ // MIX_INIT_MODPLUG = TMix_InitFlags($00000004);
101
+ // MIX_INIT_FLUIDSYNTH = TMix_InitFlags($00000020);
102
102
103
103
{ * Loads dynamic libraries and prepares them for use. Flags should be
104
104
one or more flags from MIX_InitFlags OR'd together.
105
105
It returns the flags successfully initialized, or 0 on failure.
106
106
*}
107
- function Mix_Init (flags: cint ): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_Init' { $ENDIF} { $ENDIF} ;
107
+ function Mix_Init (flags: TMix_InitFlags ): cint cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_Init' { $ENDIF} { $ENDIF} ;
108
108
109
109
{ * Unloads libraries loaded with Mix_Init *}
110
110
procedure Mix_Quit () cdecl; external MIX_LibName { $IFDEF DELPHI} { $IFDEF MACOS} name ' _MIX_Quit' { $ENDIF} { $ENDIF} ;
@@ -142,26 +142,34 @@ TMix_Chunk = record
142
142
type
143
143
PPMix_Fading = ^PMix_Fading;
144
144
PMix_Fading = ^TMix_Fading;
145
- TMix_Fading = (MIX_NO_FADING, MIX_FADING_OUT, MIX_FADING_IN);
145
+ TMix_Fading = type cint;
146
+
147
+ const
148
+ MIX_NO_FADING = TMix_Fading(0 );
149
+ MIX_FADING_OUT = TMix_Fading(1 );
150
+ MIX_FADING_IN = TMix_Fading(2 );
146
151
152
+ type
147
153
PPMix_MusicType = ^PMix_MusicType;
148
154
PMix_MusicType = ^TMix_MusicType;
149
- TMix_MusicType = (
150
- MUS_NONE,
151
- MUS_CMD,
152
- MUS_WAV,
153
- MUS_MOD,
154
- MUS_MID,
155
- MUS_OGG,
156
- MUS_MP3,
157
- MUS_MP3_MAD_UNUSED,
158
- MUS_FLAC,
159
- MUS_MODPLUG_UNUSED,
160
- MUS_OPUS,
161
- MUS_WAVPACK,
162
- MUS_GME
163
- );
155
+ TMix_MusicType = type cint;
156
+
157
+ const
158
+ MUS_NONE = TMix_MusicType(0 );
159
+ MUS_CMD = TMix_MusicType(1 );
160
+ MUS_WAV = TMix_MusicType(2 );
161
+ MUS_MOD = TMix_MusicType(3 );
162
+ MUS_MID = TMix_MusicType(4 );
163
+ MUS_OGG = TMix_MusicType(5 );
164
+ MUS_MP3 = TMix_MusicType(6 );
165
+ MUS_MP3_MAD_UNUSED = TMix_MusicType(7 );
166
+ MUS_FLAC = TMix_MusicType(8 );
167
+ MUS_MODPLUG_UNUSED = TMix_MusicType(9 );
168
+ MUS_OPUS = TMix_MusicType(10 );
169
+ MUS_WAVPACK = TMix_MusicType(11 );
170
+ MUS_GM = TMix_MusicType(12 );
164
171
172
+ type
165
173
{ * The internal format for a music chunk interpreted via mikmod *}
166
174
PPMix_Music = ^PMix_Music;
167
175
PMix_Music = type Pointer;
0 commit comments