aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-09-24 12:24:10 -0700
committerChris Robinson <[email protected]>2009-09-24 12:24:10 -0700
commitaf8e7ab98413ce569a12297c3a4103a9c65d1ced (patch)
treeb03279ef3e82da10265b78481c936cfb9fa2ed37 /OpenAL32/alSource.c
parent4289d5de7df8046c2b9207ae00314d5447fa57d9 (diff)
Check the source start position in alSourcePlayv instead of the mixer
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 74591ff2..af263279 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1325,7 +1325,6 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList)
pSource->position = 0;
pSource->position_fraction = 0;
pSource->BuffersPlayed = 0;
- pSource->FirstStart = AL_TRUE;
pSource->ulBufferID = pSource->queue->buffer;
@@ -1342,13 +1341,18 @@ ALAPI ALvoid ALAPIENTRY alSourcePlayv(ALsizei n, const ALuint *pSourceList)
pSource->state = AL_PLAYING;
pSource->inuse = AL_TRUE;
pSource->play = AL_TRUE;
- pSource->FirstStart = AL_FALSE;
}
// Check if an Offset has been set
if(pSource->lOffset)
ApplyOffset(pSource, AL_FALSE);
+ if(pSource->BuffersPlayed == 0 && pSource->position == 0 &&
+ pSource->position_fraction == 0)
+ pSource->FirstStart = AL_TRUE;
+ else
+ pSource->FirstStart = AL_FALSE;
+
// If device is disconnected, go right to stopped
if(!pContext->Device->Connected)
{