fix false "underruns"

This commit is contained in:
Glenn Maynard
2004-09-07 22:57:53 +00:00
parent 3d5d6687f6
commit 2accf47cf3
@@ -356,6 +356,10 @@ void DSoundBuf::CheckUnderrun( int cursorstart, int cursorend, int chunksize )
if( buffer_bytes_filled >= buffersize )
return;
/* If nothing is expected to be filled, we can't underrun. */
if( cursorstart == cursorend )
return;
/* If there's no data in the buffer at all, then we've completely underrun. Our
* write cursor is irrelevant; we might be unrelated to the play position completely.
* Realign. */