Audio: Don't try to fill and queue null buffer

Fixes skipping audio after interrupting and resuming
the program via eg. a debugger.
This commit is contained in:
Jonas Kulla 2014-01-04 12:28:16 +01:00
parent 3daf805350
commit a8bff666eb
1 changed files with 4 additions and 0 deletions

View File

@ -1057,6 +1057,10 @@ private:
AL::Buffer::ID buf = AL::Source::unqueueBuffer(alSrc); AL::Buffer::ID buf = AL::Source::unqueueBuffer(alSrc);
/* If something went wrong, try again later */
if (buf == AL::Buffer::ID(0))
break;
if (buf == lastBuf) if (buf == lastBuf)
{ {
/* Reset the processed sample count so /* Reset the processed sample count so