rnd-20020511-1-src
[rocksndiamonds.git] / src / init.c
index ef6586f701c4f6465f59766db271a4c1a7fb0555..a8bac24c6a44865422a2c3e44d55389631f8fb96 100644 (file)
@@ -45,7 +45,7 @@ static void InitPlayerInfo(void);
 static void InitLevelInfo(void);
 static void InitArtworkInfo(void);
 static void InitNetworkServer(void);
-static void InitSoundServer(void);
+static void InitMixer(void);
 static void InitSound(void);
 static void InitGfx(void);
 static void InitGfxBackground(void);
@@ -75,7 +75,7 @@ void OpenAll(void)
   InitArtworkInfo();           /* needed before loading gfx, sound & music */
 
   InitCounter();
-  InitSoundServer();
+  InitMixer();
   InitJoysticks();
   InitRND(NEW_RANDOMIZE);
 
@@ -153,38 +153,12 @@ void InitNetworkServer()
 #endif
 }
 
-static void ReloadCustomSounds()
-{
-  int i;
-
-#if 1
-  printf("DEBUG: reloading sounds '%s' ...\n", artwork.sounds_set_current);
-#endif
-
-  FreeAllSounds();
-
-  InitSoundList(NUM_SOUNDS);
-  for(i=0; i<NUM_SOUNDS; i++)
-    LoadSoundToList(sound_name[i], i);
-}
-
-static void ReloadCustomMusic()
-{
-#if 1
-  printf("DEBUG: reloading music '%s' ...\n", artwork.music_set_current);
-#endif
-
-  FreeAllMusic();
-
-  LoadCustomMusic();
-}
-
-static void InitSoundServer()
+static void InitMixer()
 {
   OpenAudio();
-  SetAudioReloadFunctions(ReloadCustomSounds, ReloadCustomMusic);
+  InitSoundList(sound_effects, NUM_SOUND_EFFECTS);
 
-  StartSoundserver();
+  StartMixer();
 }
 
 static void InitSound()