call digi_reset_digi_sounds in digi_close to fix crashing (d1x r1.4)
authorBradley Bell <btb@icculus.org>
Thu, 20 May 2004 08:23:08 +0000 (08:23 +0000)
committerBradley Bell <btb@icculus.org>
Thu, 20 May 2004 08:23:08 +0000 (08:23 +0000)
ChangeLog
arch/win32/digi.c

index b2dadfb..ec4dd00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-05-20  Matthew Mueller  <donut@dakotacom.net>
 
+       * arch/win32/digi.c: call digi_reset_digi_sounds in digi_close to
+       fix crashing (d1x r1.4)
+
        * arch/win32/digi.c: win32's digi_start_sound was not calling
        DS_release_slot after setting .playing=0, resulting in a
        memleak. Thanks to Stefan Ring for catching this (d1x r1.9)
index 1fe37c6..85243ec 100644 (file)
@@ -117,10 +117,14 @@ void digi_reset_digi_sounds(void);
 
 void digi_reset() { }
 
-void digi_close(void) {
-  if(digi_initialised)
-   IDirectSound_Release(lpds);
- digi_initialised = 0;
+void digi_close(void)
+{
+       if(digi_initialised)
+       {
+               digi_reset_digi_sounds();
+               IDirectSound_Release(lpds);
+       }
+       digi_initialised = 0;
 }
 
 /* Initialise audio devices. */