@@ -1116,6 +1116,8 @@ extern DECLSPEC const char *SDLCALL Mix_GetMusicAlbumTag(const Mix_Music *music)
1116
1116
*/
1117
1117
extern DECLSPEC const char * SDLCALL Mix_GetMusicCopyrightTag (const Mix_Music * music );
1118
1118
1119
+ typedef void (SDLCALL * Mix_MixCallback )(void * udata , Uint8 * stream , int len );
1120
+
1119
1121
/**
1120
1122
* Set a function that is called after all mixing is performed.
1121
1123
*
@@ -1152,7 +1154,7 @@ extern DECLSPEC const char *SDLCALL Mix_GetMusicCopyrightTag(const Mix_Music *mu
1152
1154
*
1153
1155
* \sa Mix_HookMusic
1154
1156
*/
1155
- extern DECLSPEC void SDLCALL Mix_SetPostMix (void ( SDLCALL * mix_func )( void * udata , Uint8 * stream , int len ) , void * arg );
1157
+ extern DECLSPEC void SDLCALL Mix_SetPostMix (Mix_MixCallback mix_func , void * arg );
1156
1158
1157
1159
/**
1158
1160
* Add your own music player or additional mixer function.
@@ -1198,7 +1200,9 @@ extern DECLSPEC void SDLCALL Mix_SetPostMix(void (SDLCALL *mix_func)(void *udata
1198
1200
*
1199
1201
* \sa Mix_SetPostMix
1200
1202
*/
1201
- extern DECLSPEC void SDLCALL Mix_HookMusic (void (SDLCALL * mix_func )(void * udata , Uint8 * stream , int len ), void * arg );
1203
+ extern DECLSPEC void SDLCALL Mix_HookMusic (Mix_MixCallback mix_func , void * arg );
1204
+
1205
+ typedef void (SDLCALL * Mix_MusicFinishedCallback )(void );
1202
1206
1203
1207
/**
1204
1208
* Set a callback that runs when a music object has stopped playing.
@@ -1223,7 +1227,7 @@ extern DECLSPEC void SDLCALL Mix_HookMusic(void (SDLCALL *mix_func)(void *udata,
1223
1227
*
1224
1228
* \since This function is available since SDL_mixer 2.0.0.
1225
1229
*/
1226
- extern DECLSPEC void SDLCALL Mix_HookMusicFinished (void ( SDLCALL * music_finished )( void ) );
1230
+ extern DECLSPEC void SDLCALL Mix_HookMusicFinished (Mix_MusicFinishedCallback music_finished );
1227
1231
1228
1232
/**
1229
1233
* Get a pointer to the user data for the current music hook.
@@ -1237,6 +1241,8 @@ extern DECLSPEC void SDLCALL Mix_HookMusicFinished(void (SDLCALL *music_finished
1237
1241
*/
1238
1242
extern DECLSPEC void * SDLCALL Mix_GetMusicHookData (void );
1239
1243
1244
+ typedef void (SDLCALL * Mix_ChannelFinishedCallback )(int channel );
1245
+
1240
1246
/**
1241
1247
* Set a callback that runs when a channel has finished playing.
1242
1248
*
@@ -1257,7 +1263,7 @@ extern DECLSPEC void * SDLCALL Mix_GetMusicHookData(void);
1257
1263
*
1258
1264
* \since This function is available since SDL_mixer 2.0.0.
1259
1265
*/
1260
- extern DECLSPEC void SDLCALL Mix_ChannelFinished (void ( SDLCALL * channel_finished )( int channel ) );
1266
+ extern DECLSPEC void SDLCALL Mix_ChannelFinished (Mix_ChannelFinishedCallback channel_finished );
1261
1267
1262
1268
1263
1269
#define MIX_CHANNEL_POST (-2)
@@ -2672,6 +2678,8 @@ extern DECLSPEC int SDLCALL Mix_SetSoundFonts(const char *paths);
2672
2678
*/
2673
2679
extern DECLSPEC const char * SDLCALL Mix_GetSoundFonts (void );
2674
2680
2681
+ typedef int (SDLCALL * Mix_EachSoundFontCallback )(const char * , void * );
2682
+
2675
2683
/**
2676
2684
* Iterate SoundFonts paths to use by supported MIDI backends.
2677
2685
*
@@ -2697,7 +2705,7 @@ extern DECLSPEC const char* SDLCALL Mix_GetSoundFonts(void);
2697
2705
*
2698
2706
* \sa Mix_GetSoundFonts
2699
2707
*/
2700
- extern DECLSPEC int SDLCALL Mix_EachSoundFont (int ( SDLCALL * function )( const char * , void * ) , void * data );
2708
+ extern DECLSPEC int SDLCALL Mix_EachSoundFont (Mix_EachSoundFontCallback function , void * data );
2701
2709
2702
2710
/**
2703
2711
* Set full path of the Timidity config file.
0 commit comments