X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fsound.c;h=a517bf6769785625ef2efbbbce6a76fe6a06193f;hb=69e8efac8d856859c55237e085ff8b514ae1aa3c;hp=d10f0f2b7f94a6f3f286602e9f45eb7b3e59eba9;hpb=bcb3453f710b95ec98b188b95574bea9ab336e96;p=rocksndiamonds.git diff --git a/src/libgame/sound.c b/src/libgame/sound.c index d10f0f2b..a517bf67 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) @@ -135,7 +135,7 @@ static boolean ForkAudioProcess(void) return FALSE; } - if (audio.soundserver_pid == 0) /* we are child */ + if (audio.soundserver_pid == 0) /* we are child process */ { SoundServer(); @@ -168,7 +168,7 @@ void UnixCloseAudio(void) if (audio.device_fd) close(audio.device_fd); - if (audio.soundserver_pid) + if (audio.soundserver_pid > 0) /* we are parent process */ kill(audio.soundserver_pid, SIGTERM); } #endif /* 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