Don't purge sources in an initial state

This commit is contained in:
Chris Robinson 2014-06-20 01:17:48 -07:00
parent fb07f7ef07
commit ef7ce41d07

View file

@ -1685,9 +1685,9 @@ void OpenALSoundRenderer::PurgeStoppedSources()
// Release channels that are stopped // Release channels that are stopped
foreach(ALuint, i, SfxGroup) foreach(ALuint, i, SfxGroup)
{ {
ALint state = AL_PLAYING; ALint state = AL_INITIAL;
alGetSourcei(*i, AL_SOURCE_STATE, &state); alGetSourcei(*i, AL_SOURCE_STATE, &state);
if(state == AL_PLAYING || state == AL_PAUSED) if(state == AL_INITIAL || state == AL_PLAYING || state == AL_PAUSED)
continue; continue;
FSoundChan *schan = Channels; FSoundChan *schan = Channels;