rnd-20020513-1-src
[rocksndiamonds.git] / src / libgame / sdl.c
index ae4e41ea7c3159ffd0decfefb452fa8e1874a9cc..42e6286bf78697605e42c52cef07c04b636c5c60 100644 (file)
@@ -886,16 +886,11 @@ 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)
-    audio.music_channel = 0;
-  else
-    audio.music_available = FALSE;
-
-  Mix_Volume(-1, SOUND_MAX_VOLUME);
-  Mix_VolumeMusic(SOUND_MAX_VOLUME);
+  Mixer_InitChannels();
 }
 
 inline void SDLCloseAudio(void)