From: divverent Date: Sat, 8 Mar 2008 20:12:48 +0000 (+0000) Subject: only go ahead if WAVERR_STILLPLAYING is encountered, other errors are fatal to the... X-Git-Tag: xonotic-v0.1.0preview~2328 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ab73a7a77865fb3f9dfd51fdd7595527a1d49294;p=xonotic%2Fdarkplaces.git 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 --- 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;