changeset 7:2ff53bcfe366

Try to make sure that the audio shutdown does not hang.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 28 Sep 2012 10:59:05 +0300
parents 5caa361f3972
children b3d6670c4324
files krapula.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/krapula.c	Fri Sep 28 09:49:26 2012 +0300
+++ b/krapula.c	Fri Sep 28 10:59:05 2012 +0300
@@ -990,9 +990,11 @@
     if (engine.screen)
         SDL_FreeSurface(engine.screen);
 
+    SDL_LockAudio();
     jmpClose(plr);
     jvmClose(dev);
     jssFreeModule(mod);
+    SDL_UnlockAudio();
 
     dmres_close();