Skip to content

Commit b56e514

Browse files
sezeroicculus
authored andcommitted
mark all MIX_Decoder_* as const.
1 parent 18a232a commit b56e514

19 files changed

+37
-36
lines changed

src/SDL_mixer_internal.h

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -269,27 +269,28 @@ void *MIX_GetConstIOBuffer(SDL_IOStream *io, size_t *datalen);
269269
// Slurp in all the data from an SDL_IOStream; if it appears to be memory-based, return the pointer with no allocation or copy made.
270270
void *MIX_SlurpConstIO(SDL_IOStream *io, size_t *datalen, bool *copied);
271271

272+
272273
// mu-Law and a-Law lookup tables.
273274
extern const float MIX_alawToFloat[256];
274275
extern const float MIX_ulawToFloat[256];
275276

276277
// these might not all be available, but they are all declared here as if they are.
277-
extern MIX_Decoder MIX_Decoder_AU;
278-
extern MIX_Decoder MIX_Decoder_VOC;
279-
extern MIX_Decoder MIX_Decoder_WAV;
280-
extern MIX_Decoder MIX_Decoder_AIFF;
281-
extern MIX_Decoder MIX_Decoder_MPG123;
282-
extern MIX_Decoder MIX_Decoder_DRMP3;
283-
extern MIX_Decoder MIX_Decoder_VORBIS;
284-
extern MIX_Decoder MIX_Decoder_STBVORBIS;
285-
extern MIX_Decoder MIX_Decoder_OPUS;
286-
extern MIX_Decoder MIX_Decoder_FLAC;
287-
extern MIX_Decoder MIX_Decoder_DRFLAC;
288-
extern MIX_Decoder MIX_Decoder_TIMIDITY;
289-
extern MIX_Decoder MIX_Decoder_FLUIDSYNTH;
290-
extern MIX_Decoder MIX_Decoder_WAVPACK;
291-
extern MIX_Decoder MIX_Decoder_GME;
292-
extern MIX_Decoder MIX_Decoder_XMP;
293-
extern MIX_Decoder MIX_Decoder_SINEWAVE;
294-
extern MIX_Decoder MIX_Decoder_RAW;
278+
extern const MIX_Decoder MIX_Decoder_AU;
279+
extern const MIX_Decoder MIX_Decoder_VOC;
280+
extern const MIX_Decoder MIX_Decoder_WAV;
281+
extern const MIX_Decoder MIX_Decoder_AIFF;
282+
extern const MIX_Decoder MIX_Decoder_MPG123;
283+
extern const MIX_Decoder MIX_Decoder_DRMP3;
284+
extern const MIX_Decoder MIX_Decoder_VORBIS;
285+
extern const MIX_Decoder MIX_Decoder_STBVORBIS;
286+
extern const MIX_Decoder MIX_Decoder_OPUS;
287+
extern const MIX_Decoder MIX_Decoder_FLAC;
288+
extern const MIX_Decoder MIX_Decoder_DRFLAC;
289+
extern const MIX_Decoder MIX_Decoder_TIMIDITY;
290+
extern const MIX_Decoder MIX_Decoder_FLUIDSYNTH;
291+
extern const MIX_Decoder MIX_Decoder_WAVPACK;
292+
extern const MIX_Decoder MIX_Decoder_GME;
293+
extern const MIX_Decoder MIX_Decoder_XMP;
294+
extern const MIX_Decoder MIX_Decoder_SINEWAVE;
295+
extern const MIX_Decoder MIX_Decoder_RAW;
295296

src/decoder_aiff.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ static void SDLCALL AIFF_quit_audio(void *audio_userdata)
574574
SDL_free(adata);
575575
}
576576

577-
MIX_Decoder MIX_Decoder_AIFF = {
577+
const MIX_Decoder MIX_Decoder_AIFF = {
578578
"AIFF",
579579
NULL, // init
580580
AIFF_init_audio,

src/decoder_au.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static void SDLCALL AU_quit_audio(void *audio_userdata)
262262
SDL_free(adata);
263263
}
264264

265-
MIX_Decoder MIX_Decoder_AU = {
265+
const MIX_Decoder MIX_Decoder_AU = {
266266
"AU",
267267
NULL, // init
268268
AU_init_audio,

src/decoder_drflac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ static void SDLCALL DRFLAC_quit_audio(void *audio_userdata)
324324
SDL_free(adata);
325325
}
326326

327-
MIX_Decoder MIX_Decoder_DRFLAC = {
327+
const MIX_Decoder MIX_Decoder_DRFLAC = {
328328
"DRFLAC",
329329
NULL, // init
330330
DRFLAC_init_audio,

src/decoder_drmp3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static void SDLCALL DRMP3_quit_audio(void *audio_userdata)
188188
SDL_free(adata);
189189
}
190190

191-
MIX_Decoder MIX_Decoder_DRMP3 = {
191+
const MIX_Decoder MIX_Decoder_DRMP3 = {
192192
"DRMP3",
193193
NULL, // init
194194
DRMP3_init_audio,

src/decoder_flac.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ static void SDLCALL FLAC_quit_audio(void *audio_userdata)
491491
SDL_free(adata);
492492
}
493493

494-
MIX_Decoder MIX_Decoder_FLAC = {
494+
const MIX_Decoder MIX_Decoder_FLAC = {
495495
"FLAC",
496496
FLAC_init,
497497
FLAC_init_audio,

src/decoder_fluidsynth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static void SDLCALL FLUIDSYNTH_quit_audio(void *audio_userdata)
365365
SDL_free(adata);
366366
}
367367

368-
MIX_Decoder MIX_Decoder_FLUIDSYNTH = {
368+
const MIX_Decoder MIX_Decoder_FLUIDSYNTH = {
369369
"FLUIDSYNTH",
370370
FLUIDSYNTH_init,
371371
FLUIDSYNTH_init_audio,

src/decoder_gme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ static void SDLCALL GME_quit_audio(void *audio_userdata)
206206
SDL_assert(audio_userdata == NULL); // no state.
207207
}
208208

209-
MIX_Decoder MIX_Decoder_GME = {
209+
const MIX_Decoder MIX_Decoder_GME = {
210210
"GME",
211211
GME_init,
212212
GME_init_audio,

src/decoder_mpg123.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ static void SDLCALL MPG123_quit_audio(void *audio_userdata)
443443
SDL_assert(audio_userdata == NULL); // no state.
444444
}
445445

446-
MIX_Decoder MIX_Decoder_MPG123 = {
446+
const MIX_Decoder MIX_Decoder_MPG123 = {
447447
"MPG123",
448448
MPG123_init,
449449
MPG123_init_audio,

src/decoder_opus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static void SDLCALL OPUS_quit_audio(void *audio_userdata)
345345
SDL_free(adata);
346346
}
347347

348-
MIX_Decoder MIX_Decoder_OPUS = {
348+
const MIX_Decoder MIX_Decoder_OPUS = {
349349
"OPUS",
350350
OPUS_init,
351351
OPUS_init_audio,

0 commit comments

Comments
 (0)