Skip to content

Commit

Permalink
Fixed bug 3773 - Cannot build with libmad support
Browse files Browse the repository at this point in the history
sfalexrog

As of hg d10f63427a5f, SDL_mixer fails to build with libmad support, complaining about unknown "mixer" variable in a call to SDL_MixAudioFormat (lines 267-268). This was introduced in hg 298d69a81cc9.

In music_mad.c, mixer is not defined as a global variable, but is stored in the mad_data structure. A possible fix would be to access the mixer stored in mad_data.
  • Loading branch information
slouken committed Aug 26, 2017
1 parent 97a7984 commit bdf21b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion music_mad.c
Expand Up @@ -265,7 +265,7 @@ mad_getSamples(mad_data *mp3_mad, Uint8 *stream, int len) {
SDL_memcpy(out, mp3_mad->output_buffer + mp3_mad->output_begin, num_bytes);
} else {
SDL_MixAudioFormat(out, mp3_mad->output_buffer + mp3_mad->output_begin,
mixer.format, num_bytes, mp3_mad->volume);
mp3_mad->mixer.format, num_bytes, mp3_mad->volume);
}
out += num_bytes;
mp3_mad->output_begin += num_bytes;
Expand Down

0 comments on commit bdf21b2

Please sign in to comment.