mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 20:42:30 +00:00
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.
This commit is contained in:
parent
5795be68f6
commit
b3bd74fce7
1 changed files with 4 additions and 4 deletions
|
@ -1517,6 +1517,10 @@ void S_AL_SrcUpdate( void )
|
||||||
|
|
||||||
if(!curSource->isPlaying)
|
if(!curSource->isPlaying)
|
||||||
{
|
{
|
||||||
|
qalSourcei(curSource->alSource, AL_LOOPING, AL_TRUE);
|
||||||
|
curSource->isPlaying = qtrue;
|
||||||
|
qalSourcePlay(curSource->alSource);
|
||||||
|
|
||||||
if(curSource->priority == SRCPRI_AMBIENT)
|
if(curSource->priority == SRCPRI_AMBIENT)
|
||||||
{
|
{
|
||||||
// If there are other ambient looping sources with the same sound,
|
// If there are other ambient looping sources with the same sound,
|
||||||
|
@ -1574,10 +1578,6 @@ void S_AL_SrcUpdate( void )
|
||||||
}
|
}
|
||||||
|
|
||||||
curSfx->loopActiveCnt++;
|
curSfx->loopActiveCnt++;
|
||||||
|
|
||||||
qalSourcei(curSource->alSource, AL_LOOPING, AL_TRUE);
|
|
||||||
curSource->isPlaying = qtrue;
|
|
||||||
qalSourcePlay(curSource->alSource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update locality
|
// Update locality
|
||||||
|
|
Loading…
Reference in a new issue