diff --git a/external/ALmixer/Isolated/LGPL/mpg123.c b/external/ALmixer/Isolated/LGPL/mpg123.c index 96dba24bb..67feaa31e 100755 --- a/external/ALmixer/Isolated/LGPL/mpg123.c +++ b/external/ALmixer/Isolated/LGPL/mpg123.c @@ -77,9 +77,9 @@ static int MPG123_init(void); static void MPG123_quit(void); static int MPG123_open(Sound_Sample *sample, const char *ext); static void MPG123_close(Sound_Sample *sample); -static Uint32 MPG123_read(Sound_Sample *sample); +static size_t MPG123_read(Sound_Sample *sample); static int MPG123_rewind(Sound_Sample *sample); -static int MPG123_seek(Sound_Sample *sample, Uint32 ms); +static int MPG123_seek(Sound_Sample *sample, size_t ms); /* !!! FIXME: MPEG and MPG extensions? */ static const char *extensions_mpg123[] = { "MP3", NULL }; @@ -133,9 +133,9 @@ static int MPG123_init(void) assert(mpg123_mutex == NULL); if (mpg123_init() == MPG123_OK) { - char **supported = mpg123_supported_decoders(); - print_decoders("ALL MPG123 DECODERS", mpg123_decoders()); - print_decoders("SUPPORTED MPG123 DECODERS", mpg123_supported_decoders()); + const char **supported = mpg123_supported_decoders(); + print_decoders("ALL MPG123 DECODERS", (char **)mpg123_decoders()); + print_decoders("SUPPORTED MPG123 DECODERS", (char **)mpg123_supported_decoders()); if ((supported != NULL) && (*supported != NULL)) { mpg123_mutex = SDL_CreateMutex(); @@ -192,7 +192,7 @@ static const char *set_error(mpg123_handle *mp, const int err) snprintf(buffer, sizeof (buffer), "MPG123: %s", str); __Sound_SetError(buffer); - + return(NULL); /* this is for BAIL_MACRO to not try to reset the string. */ } /* set_error */ @@ -347,7 +347,7 @@ static void MPG123_close(Sound_Sample *sample) } /* MPG123_close */ -static Uint32 MPG123_read(Sound_Sample *sample) +static size_t MPG123_read(Sound_Sample *sample) { Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; mpg123_t *mp = ((mpg123_t *) internal->decoder_private); @@ -376,7 +376,7 @@ static int MPG123_rewind(Sound_Sample *sample) } /* MPG123_rewind */ -static int MPG123_seek(Sound_Sample *sample, Uint32 ms) +static int MPG123_seek(Sound_Sample *sample, size_t ms) { Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; mpg123_t *mp = ((mpg123_t *) internal->decoder_private); @@ -390,4 +390,3 @@ static int MPG123_seek(Sound_Sample *sample, Uint32 ms) #endif /* SOUND_SUPPORTS_MPG123 */ /* end of mpg123.c ... */ - diff --git a/external/ALmixer/Isolated/LGPL/oggtremor.c b/external/ALmixer/Isolated/LGPL/oggtremor.c index 670683c55..a7f016201 100644 --- a/external/ALmixer/Isolated/LGPL/oggtremor.c +++ b/external/ALmixer/Isolated/LGPL/oggtremor.c @@ -58,9 +58,9 @@ static int OGG_init(void); static void OGG_quit(void); static int OGG_open(Sound_Sample *sample, const char *ext); static void OGG_close(Sound_Sample *sample); -static uint32_t OGG_read(Sound_Sample *sample); +static size_t OGG_read(Sound_Sample *sample); static int OGG_rewind(Sound_Sample *sample); -static int OGG_seek(Sound_Sample *sample, uint32_t ms); +static int OGG_seek(Sound_Sample *sample, size_t ms); static const char *extensions_ogg[] = { "OGG", NULL }; const Sound_DecoderFunctions __Sound_DecoderFunctions_OGG = @@ -184,7 +184,7 @@ static int OGG_open(Sound_Sample *sample, const char *ext) rc = ov_open_callbacks(internal->rw, vf, NULL, 0, RWops_ogg_callbacks); if (rc != 0) { -#if (defined DEBUG_CHATTER) +#if (defined DEBUG_CHATTER) SNDDBG(("OGG: can't grok data. reason: [%s].\n", ogg_error(rc))); #endif free(vf); @@ -200,7 +200,7 @@ static int OGG_open(Sound_Sample *sample, const char *ext) } /* if */ output_ogg_comments(vf); - + SNDDBG(("OGG: bitstream version == (%d).\n", info->version)); SNDDBG(("OGG: bitstream channels == (%d).\n", info->channels)); SNDDBG(("OGG: bitstream sampling rate == (%ld).\n", info->rate)); @@ -249,7 +249,7 @@ static void OGG_close(Sound_Sample *sample) } /* OGG_close */ /* Note: According to the Vorbis documentation: - * "ov_read() will decode at most one vorbis packet per invocation, + * "ov_read() will decode at most one vorbis packet per invocation, * so the value returned will generally be less than length." * Due to this, for buffer sizes like 16384, SDL_Sound was always getting * an underfilled buffer and always setting the EAGAIN flag. @@ -259,20 +259,20 @@ static void OGG_close(Sound_Sample *sample) * However, there may still be some corner cases where the buffer * cannot be entirely filled. So be aware. */ -static uint32_t OGG_read(Sound_Sample *sample) +static size_t OGG_read(Sound_Sample *sample) { int rc; int bitstream; Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; OggVorbis_File *vf = (OggVorbis_File *) internal->decoder_private; - + rc = ov_read(vf, internal->buffer, internal->buffer_size, &bitstream); /* Make sure the read went smoothly... */ if (rc == 0) sample->flags |= SOUND_SAMPLEFLAG_EOF; - + else if (rc < 0) sample->flags |= SOUND_SAMPLEFLAG_ERROR; @@ -316,12 +316,12 @@ static uint32_t OGG_read(Sound_Sample *sample) * is because the requested amount of data was smaller * than the minimum packet size. * For now, I will be conservative - * and not set the EOF flag, and let the next call to + * and not set the EOF flag, and let the next call to * this function figure it out. - * I think the ERROR flag is safe to set because - * it looks like OGG simply returns 0 if the - * read size is too small. - * And in most cases for sensible buffer sizes, + * I think the ERROR flag is safe to set because + * it looks like OGG simply returns 0 if the + * read size is too small. + * And in most cases for sensible buffer sizes, * this fix will fill the buffer, * so we can set the EAGAIN flag without worrying * that it will always be set. @@ -363,7 +363,7 @@ static int OGG_rewind(Sound_Sample *sample) } /* OGG_rewind */ -static int OGG_seek(Sound_Sample *sample, uint32_t ms) +static int OGG_seek(Sound_Sample *sample, size_t ms) { Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; OggVorbis_File *vf = (OggVorbis_File *) internal->decoder_private; @@ -376,4 +376,3 @@ static int OGG_seek(Sound_Sample *sample, uint32_t ms) /* end of ogg.c ... */ - diff --git a/external/ALmixer/Isolated/LGPL/wav.c b/external/ALmixer/Isolated/LGPL/wav.c index 4a48795bf..dd250868c 100644 --- a/external/ALmixer/Isolated/LGPL/wav.c +++ b/external/ALmixer/Isolated/LGPL/wav.c @@ -68,9 +68,9 @@ static int WAV_init(void); static void WAV_quit(void); static int WAV_open(Sound_Sample *sample, const char *ext); static void WAV_close(Sound_Sample *sample); -static uint32_t WAV_read(Sound_Sample *sample); +static size_t WAV_read(Sound_Sample *sample); static int WAV_rewind(Sound_Sample *sample); -static int WAV_seek(Sound_Sample *sample, uint32_t ms); +static int WAV_seek(Sound_Sample *sample, size_t ms); static const char *extensions_wav[] = { "WAV", NULL }; const Sound_DecoderFunctions __Sound_DecoderFunctions_WAV = @@ -246,7 +246,7 @@ typedef struct { uint32_t chunkID; - /* Johnson Lin wanted to clean up compiler warnings on Windows/CodeBlocks. + /* Johnson Lin wanted to clean up compiler warnings on Windows/CodeBlocks. * This was originally a signed int32_t. The code usage and intent seems to imply that it should be a uint32_t. */ /* int32_t chunkSize; */ @@ -818,7 +818,7 @@ static void WAV_close(Sound_Sample *sample) } /* WAV_close */ -static uint32_t WAV_read(Sound_Sample *sample) +static size_t WAV_read(Sound_Sample *sample) { Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; wav_t *w = (wav_t *) internal->decoder_private; @@ -838,7 +838,7 @@ static int WAV_rewind(Sound_Sample *sample) } /* WAV_rewind */ -static int WAV_seek(Sound_Sample *sample, uint32_t ms) +static int WAV_seek(Sound_Sample *sample, size_t ms) { Sound_SampleInternal *internal = (Sound_SampleInternal *) sample->opaque; wav_t *w = (wav_t *) internal->decoder_private; @@ -848,4 +848,3 @@ static int WAV_seek(Sound_Sample *sample, uint32_t ms) #endif /* SOUND_SUPPORTS_WAV */ /* end of wav.c ... */ - diff --git a/external/mpg123-1.13.1/src/libmpg123/compat.h b/external/mpg123-1.13.1/src/libmpg123/compat.h index 04b2cd8c2..65c57f44f 100644 --- a/external/mpg123-1.13.1/src/libmpg123/compat.h +++ b/external/mpg123-1.13.1/src/libmpg123/compat.h @@ -17,7 +17,7 @@ #include "config.h" #include "intsym.h" -#ifdef HAVE_STDLIB_H +#ifndef HAVE_STDLIB_H /* realloc, size_t */ #include #endif @@ -33,7 +33,7 @@ #endif #endif -#ifdef HAVE_UNISTD_H +#ifndef HAVE_UNISTD_H #include #endif @@ -52,7 +52,7 @@ #ifdef HAVE_LIMITS_H #include #endif - + #ifndef SIZE_MAX #define SIZE_MAX ((size_t)-1) #endif @@ -60,7 +60,7 @@ #define ULONG_MAX ((unsigned long)-1) #endif -#ifdef HAVE_STRING_H +#ifndef HAVE_STRING_H #include #endif