]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - snd_win.c
only go ahead if WAVERR_STILLPLAYING is encountered, other errors are fatal to the...
[xonotic/darkplaces.git] / snd_win.c
index c61804730a7de28f4d1c911364e4abfc31e8151e..80a7022951d9a98ee9e02b828ff5ce548561a1b3 100644 (file)
--- 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;