more error checking ala WildCode

This commit is contained in:
Bill Currie 2003-03-10 21:28:18 +00:00
parent 2d796e09f4
commit cf3aeadb42

View file

@ -540,8 +540,9 @@ SND_GetSoundtime (void)
// it is possible to miscount buffers if it has wrapped twice between
// calls to SND_Update. Oh well.
samplepos = snd_output_funcs->pS_O_GetDMAPos ();
if ((samplepos = snd_output_funcs->pS_O_GetDMAPos ()) == -1)
return;
if (samplepos < oldsamplepos) {
buffers++; // buffer wrapped