From ab73a7a77865fb3f9dfd51fdd7595527a1d49294 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 8 Mar 2008 20:12:48 +0000 Subject: [PATCH] only go ahead if WAVERR_STILLPLAYING is encountered, other errors are fatal to the sound system again. TODO: handle WAVERR_STILLPLAYING in a better way (like, clearing the buffer?) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8198 d7cf8633-e32d-0410-b094-e92efae38249 --- snd_win.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/snd_win.c b/snd_win.c index c6180473..80a70229 100644 --- a/snd_win.c +++ b/snd_win.c @@ -709,10 +709,17 @@ void SndSys_Submit (void) if (wResult != MMSYSERR_NOERROR) { - if (developer.integer >= 1000) - Con_Print("waveOutWrite failed (too much sound data)\n"); - //SndSys_Shutdown (); - //return; + if (wResult == WAVERR_STILLPLAYING) + { + if(developer.integer >= 1000) + Con_Print("waveOutWrite failed (too much sound data)\n"); + } + else + { + Con_Printf("waveOutWrite failed, error code %d\n", (int) wResult); + SndSys_Shutdown (); + return; + } } paintpot -= wav_buffer_size; -- 2.39.2