From 5eeeb4703415b1fbad7910c2a3bf2c5af13916f8 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 7 Apr 2002 21:04:13 +0200 Subject: [PATCH] rnd-20020407-5-src --- src/init.c | 4 +-- src/libgame/sound.c | 85 ++++++++++++++++++++++++++++++++++++++++++--- src/libgame/sound.h | 6 ++++ src/timestamp.h | 2 +- 4 files changed, 90 insertions(+), 7 deletions(-) diff --git a/src/init.c b/src/init.c index e5a1738b..733df29c 100644 --- a/src/init.c +++ b/src/init.c @@ -424,14 +424,14 @@ void ReloadCustomArtwork() if (artwork.sounds_set_current != artwork.snd_current->name) { - printf("reload sounds ...\n"); + InitReloadSounds(artwork.snd_current->name); artwork.sounds_set_current = artwork.snd_current->name; } if (artwork.music_set_current != artwork.mus_current->name) { - printf("reload music ...\n"); + InitReloadMusic(artwork.mus_current->name); artwork.music_set_current = artwork.mus_current->name; } diff --git a/src/libgame/sound.c b/src/libgame/sound.c index 92c2253c..29d5a981 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -38,7 +38,7 @@ static int playing_sounds = 0; static struct SoundControl playlist[MAX_SOUNDS_PLAYING]; static struct SoundControl emptySoundControl = { - -1,0,0, FALSE,FALSE,FALSE,FALSE,FALSE, 0,0L,0L,NULL + -1,0,0, FALSE,FALSE,FALSE,FALSE,FALSE,FALSE,FALSE, 0,0L,0L,NULL }; #if defined(PLATFORM_UNIX) @@ -227,6 +227,22 @@ void SoundServer(void) != sizeof(snd_ctrl)) Error(ERR_EXIT_SOUND_SERVER, "broken pipe -- no sounds"); + if (snd_ctrl.reload_sounds || snd_ctrl.reload_music) + { + for(i=0;i