From a8bff666eb3b87fd3c57e82f76e3c70be4bf9492 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Sat, 4 Jan 2014 12:28:16 +0100 Subject: [PATCH] Audio: Don't try to fill and queue null buffer Fixes skipping audio after interrupting and resuming the program via eg. a debugger. --- src/audio.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/audio.cpp b/src/audio.cpp index 2d64e0c..b3fb372 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -1057,6 +1057,10 @@ private: 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) { /* Reset the processed sample count so