foxygit / doom Log in
commit 2fb5056878a2d5a29d8bb9597e2f458b46862ddd
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Thu Sep 25 21:14:05 2008 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Thu Sep 25 21:14:05 2008 +0000

    Shutdown sound at exit, so that the music does not continue to play at
    the ENDOOM screen.

    Subversion-branch: /branches/raven-branch
    Subversion-revision: 1287
---
 src/heretic/s_sound.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/heretic/s_sound.c b/src/heretic/s_sound.c
index 86483402..2deca19f 100644
--- a/src/heretic/s_sound.c
+++ b/src/heretic/s_sound.c
@@ -24,6 +24,7 @@
 #include <stdlib.h>

 #include "doomdef.h"
+#include "i_system.h"
 #include "m_random.h"
 #include "sounds.h"
 #include "s_sound.h"
@@ -42,6 +43,7 @@
 ===============================================================================
 */

+void S_ShutDown(void);
 boolean S_StopSoundID(int sound_id, int priority);

 static channel_t channel[MAX_CHANNELS];
@@ -500,6 +502,8 @@ void S_Init(void)
     }
     I_SetMusicVolume(snd_MusicVolume);
     S_SetMaxVolume(true);
+
+    I_AtExit(S_ShutDown, true);
 }

 void S_GetChannelInfo(SoundInfo_t * s)