Sat, 21 Oct 2017 15:43:15 -0700We don't use C++ in SDL_mixer, and if we did that should be @CXX@
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 15:43:15 -0700] rev 827
We don't use C++ in SDL_mixer, and if we did that should be @CXX@

Sat, 21 Oct 2017 15:29:32 -0700Fixed bug 3903 - music_wav.c SamplerChunk struct
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 15:29:32 -0700] rev 826
Fixed bug 3903 - music_wav.c SamplerChunk struct

Ozkan Sezer

It seems Watcom supports arr[] or arr[1] but not arr[0].
I suggest changing it to [1].

Sat, 21 Oct 2017 15:21:31 -0700Fixed bug 1558 - mikmod broken volume and loop support
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 15:21:31 -0700] rev 825
Fixed bug 1558 - mikmod broken volume and loop support

raptor85

When playing .mod or .it files using SDL_mixer's mikmod support looping and initial volume are ignored, making music play improperly and making volume reset to max every time the song loops. This makes Mix_VolumeMusic work differently for mikmod than any other music support as it doesn't persist volume through the loop.

Attached is a quick patch I made that fixes both issues for me by enabling loop support and setting the initial volume when starting play.

Sat, 21 Oct 2017 15:00:50 -0700Fixed bug 2017 - Adding some version macros like for SDL
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 15:00:50 -0700] rev 824
Fixed bug 2017 - Adding some version macros like for SDL

Martin Gerhardy

It would be great to get some version macros as we have them for SDL, too.

Some function prototypes had changes for SDL_mixer 2.0, too.

/**
* This is the version number macro for the current SDL_mixer version.
*/
#define SDL_MIXER_COMPILEDVERSION \
SDL_VERSIONNUM(SDL_MIXER_MAJOR_VERSION, SDL_MIXER_MINOR_VERSION, SDL_MIXER_PATCHLEVEL)

/**
* This macro will evaluate to true if compiled with SDL_mixer at least X.Y.Z.
*/
#define SDL_MIXER_VERSION_ATLEAST(X, Y, Z) \
(SDL_MIXER_COMPILEDVERSION >= SDL_VERSIONNUM(X, Y, Z))

Sat, 21 Oct 2017 14:40:31 -0700Fixed linker order so -lmingw32 comes before -lSDL2main
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 14:40:31 -0700] rev 823
Fixed linker order so -lmingw32 comes before -lSDL2main

Sat, 21 Oct 2017 22:32:00 +0300readmidi.c: make sure the file reports a legal format and tracks count.
Ozkan Sezer <sezero@users.sourceforge.net> [Sat, 21 Oct 2017 22:32:00 +0300] rev 822
readmidi.c: make sure the file reports a legal format and tracks count.

Sat, 21 Oct 2017 12:34:32 -0700Fixed bug 2670 - Possible memory overflow in Mix_LoadWAV_RW
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 12:34:32 -0700] rev 821
Fixed bug 2670 - Possible memory overflow in Mix_LoadWAV_RW

Lee Salzman

In mixer.c, Mix_LoadWAV_RW, there is the following code:

wavecvt.len = chunk->alen & ~(samplesize-1);
wavecvt.buf = (Uint8 *)SDL_calloc(1, wavecvt.len*wavecvt.len_mult);
...
SDL_memcpy(wavecvt.buf, chunk->abuf, chunk->alen);

That SDL_memcpy should rather be:
SDL_memcpy(wavectf.buf, chunk->abuf, wavecvt.len);

If you imagine that wavecvt.len_mult was 1 and samplesize was greater than 1 with wavecvt.len < chunk->alen, then it may overwrite.

Sat, 21 Oct 2017 12:17:37 -0700Fixed bug 3903 - music_wav.c SamplerChunk struct
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 12:17:37 -0700] rev 820
Fixed bug 3903 - music_wav.c SamplerChunk struct

Ozkan Sezer

music_wav.c : SamplerChunk struct has SampleLoop loops[]; as its
last member, ancient gcc fails with it:
music_wav.c:108: field `loops' has incomplete type

Changing it to SampleLoop loops[0] (or SampleLoop loops[1]) makes
it to compile using gcc2.95, if there is interest to support this.
I can't remember how MSVC supports flexible array members.

Sat, 21 Oct 2017 11:38:48 -0700Updated the iOS project and added FLAC music support
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 11:38:48 -0700] rev 819
Updated the iOS project and added FLAC music support

Sat, 21 Oct 2017 10:23:58 -0700Fixed compiler warning
Sam Lantinga <slouken@libsdl.org> [Sat, 21 Oct 2017 10:23:58 -0700] rev 818
Fixed compiler warning