aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/alffplay.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index 60b60a65..0f7eb769 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -746,9 +746,11 @@ int AudioState::handler()
alGetSourcei(mSource, AL_SOURCE_STATE, &state);
if(state == AL_STOPPED)
{
- /* AL_STOPPED means there was an underrun. Rewind the source to get
+ /* AL_STOPPED means there was an underrun. Clear the buffer queue
+ * since this likely means we're late, and rewind the source to get
* it back into an AL_INITIAL state.
*/
+ alSourcei(mSource, AL_BUFFER, 0);
alSourceRewind(mSource);
continue;
}