Skip to content

Commit

Permalink
Only initialize the stream with SDL 1.3 and newer
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 15, 2007
1 parent 81f79fc commit 66343bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mixer.c
Expand Up @@ -161,8 +161,10 @@ static void mix_channels(void *udata, Uint8 *stream, int len)
int i, mixable, volume;
Uint32 sdl_ticks;

/* Initialize the audio stream (needed for 1.3 and later)
#if SDL_VERSION_ATLEAST(1, 3, 0)
/* Need to initialize the stream in SDL 1.3+ */
memset(stream, mixer.silence, len);
#endif

/* Mix the music (must be done before the channels are added) */
if ( music_active || (mix_music != music_mixer) ) {
Expand Down

0 comments on commit 66343bd

Please sign in to comment.