From ef7ce41d0786c8c56b1cca7e5e4317fefa593ca8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 20 Jun 2014 01:17:48 -0700 Subject: [PATCH] Don't purge sources in an initial state --- src/sound/oalsound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/oalsound.cpp b/src/sound/oalsound.cpp index 64fb24ff03..d62439506c 100644 --- a/src/sound/oalsound.cpp +++ b/src/sound/oalsound.cpp @@ -1685,9 +1685,9 @@ void OpenALSoundRenderer::PurgeStoppedSources() // Release channels that are stopped foreach(ALuint, i, SfxGroup) { - ALint state = AL_PLAYING; + ALint state = AL_INITIAL; alGetSourcei(*i, AL_SOURCE_STATE, &state); - if(state == AL_PLAYING || state == AL_PAUSED) + if(state == AL_INITIAL || state == AL_PLAYING || state == AL_PAUSED) continue; FSoundChan *schan = Channels;