call digi_reset_digi_sounds in digi_close to fix crashing (d1x r1.4)

This commit is contained in:
Bradley Bell 2004-05-20 08:23:08 +00:00
parent 1e9f0618f2
commit 7b1c66d2a1
2 changed files with 11 additions and 4 deletions

View file

@ -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)

View 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. */