X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsdl.c;h=6365c87161db3a0efb246895c26195f5be95d321;hb=6d37ddaaf9915af0f483f4fc04d07b98e99e091e;hp=ae4e41ea7c3159ffd0decfefb452fa8e1874a9cc;hpb=c431e727cdc0ecec3468ab4b89cae2e9708aa49a;p=rocksndiamonds.git diff --git a/src/libgame/sdl.c b/src/libgame/sdl.c index ae4e41ea..6365c871 100644 --- a/src/libgame/sdl.c +++ b/src/libgame/sdl.c @@ -886,7 +886,9 @@ inline void SDLOpenAudio(void) audio.sound_enabled = TRUE; /* set number of available mixer channels */ - audio.channels = Mix_AllocateChannels(NUM_MIXER_CHANNELS); + audio.num_channels = Mix_AllocateChannels(NUM_MIXER_CHANNELS); + audio.music_channel = MUSIC_CHANNEL; + audio.first_sound_channel = FIRST_SOUND_CHANNEL; /* reserve first channel for music loops */ if (Mix_ReserveChannels(1) == 1) @@ -896,6 +898,8 @@ inline void SDLOpenAudio(void) Mix_Volume(-1, SOUND_MAX_VOLUME); Mix_VolumeMusic(SOUND_MAX_VOLUME); + + Mixer_InitChannels(); } inline void SDLCloseAudio(void)