shithub: choc

Download patch

ref: 2fb5056878a2d5a29d8bb9597e2f458b46862ddd
parent: b05a3f9448a690bf1d6805ed20081227921f64d9
author: Simon Howard <fraggle@gmail.com>
date: Thu Sep 25 17:14:05 EDT 2008

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

--- 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 @@
     }
     I_SetMusicVolume(snd_MusicVolume);
     S_SetMaxVolume(true);
+
+    I_AtExit(S_ShutDown, true);
 }
 
 void S_GetChannelInfo(SoundInfo_t * s)