diff --git a/src/include/sound_server.h b/src/include/sound_server.h
index 4bdb4b673..addd2f07a 100644
--- a/src/include/sound_server.h
+++ b/src/include/sound_server.h
@@ -191,6 +191,9 @@ extern int InitSoundServer(void);
  */
 extern void WriteSound(void);
 
+    ///	Cleanup sound.
+extern void QuitSound(void);
+
 #else	// }{ WITH_SOUND
 
 /*----------------------------------------------------------------------------
@@ -202,6 +205,7 @@ extern void WriteSound(void);
 
 #define InitSound()	0		/// Dummy macro for without sound
 #define WriteSound()			/// Dummy macro for without sound
+#define QuitSound()			/// Dummy macro for without sound
 
 #endif	// { WITH_SOUND
 
diff --git a/src/stratagus/stratagus.cpp b/src/stratagus/stratagus.cpp
index 0e94f7331..05f82f7c7 100644
--- a/src/stratagus/stratagus.cpp
+++ b/src/stratagus/stratagus.cpp
@@ -499,6 +499,7 @@ global volatile void Exit(int err)
 	extern unsigned PfCounterNotReachable;
     );
 
+    QuitSound();
     NetworkQuit();
     DebugLevel0("Frames %d, Slow frames %d = %d%%\n"
 	,FrameCounter,SlowFrameCounter