diff options
author | Zack Middleton <zturtleman@gmail.com> | 2013-11-10 23:28:54 -0600 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:36 +0100 |
commit | a396e5d88d1108b434ebedff0c60a1458f735cef (patch) | |
tree | 1d068da2703dafa4c2a3a5e2b020e6dd6d616fad /src/client | |
parent | f7e122a3f11830fa4c5e049296b31969d2964280 (diff) |
Fix restoring loop sound position on OS X
The default OpenAL library on OS X errors AL_INVALID_VALUE for AL_SEC_OFFSET if source isn't playing.
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/snd_openal.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/snd_openal.c b/src/client/snd_openal.c index fa18f2dc..403d013c 100644 --- a/src/client/snd_openal.c +++ b/src/client/snd_openal.c @@ -1536,6 +1536,10 @@ void S_AL_SrcUpdate( void ) if(!curSource->isPlaying) { + qalSourcei(curSource->alSource, AL_LOOPING, AL_TRUE); + curSource->isPlaying = qtrue; + qalSourcePlay(curSource->alSource); + if(curSource->priority == SRCPRI_AMBIENT) { // If there are other ambient looping sources with the same sound, @@ -1593,10 +1597,6 @@ void S_AL_SrcUpdate( void ) } curSfx->loopActiveCnt++; - - qalSourcei(curSource->alSource, AL_LOOPING, AL_TRUE); - curSource->isPlaying = qtrue; - qalSourcePlay(curSource->alSource); } // Update locality |