summaryrefslogtreecommitdiff
path: root/src/qcommon
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-06-17 23:29:19 +0000
committerTim Angus <tim@ngus.net>2013-01-10 21:33:46 +0000
commitf360bc65da284346cea74c13421d72839658544c (patch)
tree26dfd6c58f1c3ce6b98d85b5648d75b2618e0611 /src/qcommon
parent3283f1d422628116f19f784026001f954f7c7aaa (diff)
- Fix memory leak in DMA sound after S_Shutdown() - Make codec load use temp hunk memory instead of zone mem - Fix sound issues with direct sound and game_restart (#4526)
Diffstat (limited to 'src/qcommon')
-rw-r--r--src/qcommon/common.c6
-rw-r--r--src/qcommon/qcommon.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/qcommon/common.c b/src/qcommon/common.c
index 02689141..9a9ca12d 100644
--- a/src/qcommon/common.c
+++ b/src/qcommon/common.c
@@ -2407,10 +2407,10 @@ void Com_GameRestart(int checksumFeed, qboolean clientRestart)
// Clean out any user and VM created cvars
Cvar_Restart(qtrue);
Com_ExecuteCfg();
-
- // Restart sound subsystem so old handles are flushed
- CL_Snd_Restart();
+ // shut down sound system before restart
+ CL_Snd_Shutdown();
+
if(clientRestart)
CL_StartHunkUsers(qfalse);
diff --git a/src/qcommon/qcommon.h b/src/qcommon/qcommon.h
index 2cf2b27b..4b1d48c2 100644
--- a/src/qcommon/qcommon.h
+++ b/src/qcommon/qcommon.h
@@ -975,7 +975,7 @@ void CL_FlushMemory( void );
void CL_StartHunkUsers( qboolean rendererOnly );
// start all the client stuff using the hunk
-void CL_Snd_Restart(void);
+void CL_Snd_Shutdown(void);
// Restart sound subsystem
void Key_KeynameCompletion( void(*callback)(const char *s) );