Check for null buffers from directsound. (forgot to commit, hm..)

This commit is contained in:
Dabb 2001-02-15 18:25:09 +00:00
parent 01baf4a868
commit d81eb19c1f

View file

@ -94,8 +94,13 @@ S_TransferStereo16 (int endtime)
lpaintedtime = paintedtime;
#ifdef _WIN32
// fixme: should check for NULL pbuf value
if (pDSBuf) pbuf=DSOUND_LockBuffer(true);
if (pDSBuf) {
pbuf=DSOUND_LockBuffer(true);
if(!pbuf) {
Con_Printf("DSOUND_LockBuffer fails!\n");
return;
}
}
else
#endif
{
@ -151,8 +156,13 @@ S_TransferPaintBuffer (int endtime)
snd_vol = volume->value * 256;
#ifdef _WIN32
// fixme: should check for NULL pbuf value
if (pDSBuf) pbuf=DSOUND_LockBuffer(true);
if (pDSBuf) {
pbuf=DSOUND_LockBuffer(true);
if(!pbuf) {
Con_Printf("DSOUND_LockBuffer fails!\n");
return;
}
}
else
#endif
{