| Summary: | several small SDL_mixer fixes | ||
|---|---|---|---|
| Product: | SDL_mixer | Reporter: | Ozkan Sezer <sezeroz> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
smix-001.patch
smix-002.patch smix-003.patch smix-004.patch smix-005.patch smix-006.patch smix-007.patch smix-008.patch smix-001a.patch smix-008a.patch smix-009.patch |
||
|
Description
Ozkan Sezer
2017-10-15 20:01:44 UTC
Created attachment 2987 [details]
smix-001.patch
dynamic_mod.h: fix prototypes of MikMod_Init and MikMod_strerror:
- old mikmod headers interchangingly used int and BOOL which led
to confusions: MikMod_Init() returns error, not success.
- libmikmod >= 3.3.2 constified MikMod_Init() and MikMod_strerror().
Created attachment 2988 [details]
smix-002.patch
music_mod.c: fix LMM_Seek: old mikmod headers interchangingly used
int and BOOL which led to confusions. MREADER->Seek() function must
behave the same as fseek() itself, adjusted it accordingly.
** Please review error handling.
Created attachment 2989 [details]
smix-003.patch
music_mad.c: SDL_RWread() returns size_t, i.e. an unsigned value:
as such, read_size cannot be negative. adjusted read_next_frame()
accordingly.
** FIXME: how to detect error instead of eof?
Created attachment 2990 [details]
smix-004.patch
music.c: watcom does not provide strtok_r(), so simply use strtok()
like the mingw cases.
Created attachment 2991 [details] smix-005.patch mixer.c (mix_channels): fix misplaced SDLCALL so that it compiles. (c.f. https://hg.libsdl.org/SDL_mixer/rev/fca02fccc6ab ) Created attachment 2992 [details]
smix-006.patch
smpeg2, mpegtoraw.cpp: fix the wrong assert.
Created attachment 2993 [details]
smix-007.patch
smpeg2, proto.h: define __STDC__ for watcom, too.
Created attachment 2994 [details]
smix-008.patch
smpeg2: add missing SDLCALL to Play_MPEGaudioSDL, Decode_MPEGaudio and Play_MPEGvideo
[last attached patch.]
Created attachment 2995 [details]
smix-001a.patch
Better patch for case #1:
dynamic_mod.h: fix prototypes of MikMod_Init and MikMod_strerror:
- old mikmod headers interchangingly used int and BOOL which led
to confusions: MikMod_Init() returns error, not success.
- libmikmod >= 3.3.2 constified MikMod_Init() and MikMod_strerror().
- dynamic_mod.c: adjust casts accordingly.
Created attachment 2996 [details]
smix-008a.patch
Better patch for case #8 (original patch missed a place):
smpeg2: add missing SDLCALL to Play_MPEGaudioSDL, Decode_MPEGaudio,
Play_MPEGvideo, and SystemThread.
Created attachment 2997 [details]
smix-009.patch
music_mod.c: add iobase members to the LMM_MREADER struct:
struct MREADER in libmikmod <= 3.2.0-beta2
doesn't have iobase members. adding them here
so that if we compile against 3.2.0-beta2, we
can still run OK against 3.2.0b3 and newer.
Added, thanks! Please don't make any other changes to SDL_mixer for the moment, I'm in the process of rewriting music.c and a ton of code is moving around. (In reply to Sam Lantinga from comment #12) > Please don't make any other changes to SDL_mixer for the moment, I'm in the > process of rewriting music.c and a ton of code is moving around. OK, I don't have anything else anyway. Is there any interest in backporting these and #3886 to SDL-1.2 branch? There isn't another 1.2 release planned, but you're welcome to provide patches and I'll apply them to Mercurial. The big update is pushed with a ton of rewrite and possibly exciting new bugs. Please feel free to submit bug reports for cleanup on the new code. Cheers! |