I Filed two bugs in bugzilla regarding SDL and SDL_mixer when -Wundef and
-Wstrict-prototypes flags are one.The bugs and the attached patches can be
seen at:
http://bugzilla.libsdl.org/show_bug.cgi?id=1216
http://bugzilla.libsdl.org/show_bug.cgi?id=1217
I Filed two bugs in bugzilla regarding SDL and SDL_mixer when -Wundef
and -Wstrict-prototypes flags are one.The bugs and the attached patches
can be seen at:
These are in revision control now, thank you!
–ryan.
ThanksOn Mon, Jun 6, 2011 at 7:25 PM, Ryan C. Gordon wrote:
I Filed two bugs in bugzilla regarding SDL and SDL_mixer when -Wundef
and -Wstrict-prototypes flags are one.The bugs and the attached patches
can be seen at:
These are in revision control now, thank you!
–ryan.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Recently, I am writting a game based SDL-1.3, then found it is necessary
that modify some source code of SDL library. These code exist in both
SDL.dll and SDL_mixer.dll. I list here and hope to be good for SDL
developer.
SDL.dll, version: (SDL-1.3.0-5538)****************************************************
/audio/SDL_audiotypecvt.c
function: SDL_Upsample_S16LSB_2c_x2
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 2;
const Sint16 *target = ((const Sint16 *) cvt->buf) - 2;
===>update to
Sint16 *dst = ((Sint16 *) (cvt->buf + dstsize)) - 4;
const Sint16 *target = ((const Sint16 *) cvt->buf) - 4;
function: SDL_Upsample_S16LSB_2c
const int dstsize = (int) (((double)cvt->len_cvt) * cvt->rate_incr);
===>update to
const int dstsize = ((int) (((double)cvt->len_cvt) * cvt->rate_incr)) & ~3;
function: SDL_Downsample_S16LSB_2c
const int dstsize = (int) (((double)cvt->len_cvt) * cvt->rate_incr);
===>update to
const int dstsize = ((int) (((double)cvt->len_cvt) * cvt->rate_incr)) & ~3;
SDL_mixer.dll, version: (SDL_mixer-1.2.11)
<SDL_mixer-1.2.11>/load_aiff.c
function: Mix_LoadAIFF_RW
*audio_buf = malloc(*audio_len);
===>update to
*audio_buf = SDL_malloc(*audio_len);
<SDL_mixer-1.2.11>/load_ogg.c
function: Mix_LoadOGG_RW
*audio_buf = malloc(*audio_len);
===>update to
*audio_buf = SDL_malloc(*audio_len);