mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-22 04:01:17 +00:00
Check for null buffers from directsound. (forgot to commit, hm..)
This commit is contained in:
parent
01baf4a868
commit
d81eb19c1f
1 changed files with 14 additions and 4 deletions
|
@ -94,8 +94,13 @@ S_TransferStereo16 (int endtime)
|
||||||
lpaintedtime = paintedtime;
|
lpaintedtime = paintedtime;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// fixme: should check for NULL pbuf value
|
if (pDSBuf) {
|
||||||
if (pDSBuf) pbuf=DSOUND_LockBuffer(true);
|
pbuf=DSOUND_LockBuffer(true);
|
||||||
|
if(!pbuf) {
|
||||||
|
Con_Printf("DSOUND_LockBuffer fails!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -151,8 +156,13 @@ S_TransferPaintBuffer (int endtime)
|
||||||
snd_vol = volume->value * 256;
|
snd_vol = volume->value * 256;
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// fixme: should check for NULL pbuf value
|
if (pDSBuf) {
|
||||||
if (pDSBuf) pbuf=DSOUND_LockBuffer(true);
|
pbuf=DSOUND_LockBuffer(true);
|
||||||
|
if(!pbuf) {
|
||||||
|
Con_Printf("DSOUND_LockBuffer fails!\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue